Skip to content

Instantly share code, notes, and snippets.

View dlitz's full-sized avatar

Darsey Litzenberger dlitz

View GitHub Profile

scenario: you have a windows vm failing to boot with INACCESSIBLE_BOOT_DEVICE and changing the disk type to ide or something else causes another bsod. how to you get it to boot up again without a physical machine?

download the stable virtio drivers from here, in iso form: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso

add the iso to your qemu/virt manager config as a cd/dvd drive

windows should send you to the recovery mode screen, but if it doesn't you might have to run a windows install iso to get to it.

@coderjo
coderjo / map2dmtable.py
Created September 26, 2019 09:46
Quick Python script to generate a linux device mapper table from a ddrescue map file, placing errors where ddrescue had bad blocks.
#!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(description='Create a device mapper table from a ddrescue map file. '
'Blocks that are marked as bad will be mapped to the error target, while successfully-read '
'blocks will be passed through to the device. The dm table will be written to stdout so it can '
'be piped directly into dmsetup.')
parser.add_argument('mapfile', help='The ddrescue map file to convert')
parser.add_argument('device', help='The device containing the image that corresponds to the map file. (typically a loop device)')
@stecman
stecman / _readme.md
Last active January 18, 2025 14:31
Brother P-Touch PT-P300BT bluetooth driver python

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

@gabonator
gabonator / password.txt
Last active April 23, 2025 22:31
HiSilicon IP camera root passwords
Summary of passwords by sperglord8008s, updated November 1. 2020. For login try "root", "default", "defaul" or "root"
00000000
059AnkJ
4uvdzKqBkj.jg
7ujMko0admin
7ujMko0vizxv
123
1111
1234
@Xion
Xion / auth.py
Last active October 2, 2022 02:16
Query string authenticators for Requests
"""
Requests' authenticator that attaches given parameters
to the URL query string.
License: Public Domain.
"""
from requests.auth import AuthBase
class QueryStringAuth(AuthBase):