Skip to content

Instantly share code, notes, and snippets.

View wpyoga's full-sized avatar

William Poetra Yoga wpyoga

View GitHub Profile
wpyoga / .md
Last active June 22, 2023 19:22
basic vscode code formatting and linting



root = true

charset = utf-8
insert_final_newline = true
end_of_line = lf
wpyoga / gist:740a8994b86275f522f0e7bd89b1793d
Last active June 18, 2023 09:10
initialize cdk without installing cdk globally
git init my-cdk-app
cd my-cdk-app
npx cdk@latest init app --language typescript
This will:
1. initialize an empty git repository
1. initialize a new cdk app using the latest CDK version
Note that there is no initial commit created if we initialize the repo this way.
connect iphone to pc
get the serial number
usb 1-1: new high-speed USB device number 4 using xhci_hcd
usb 1-1: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=10.06
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: iPhone
wpyoga / gist:f30fb8fc3304d043ba508891a533e2e0
Last active June 17, 2023 02:46
add iphone to vm and debug over wifi
macos ventura 13.4 on hackintosh vm
ios 16.4 on iphone x
on vm host
make udev rule file /etc/udev/rules.d/39-usbmuxd.rules:
# filename is chosen to overwrite /usr/lib/udev/rules.d/39-usbmuxd.rules
# see RULES FILES section in udev(7)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", MODE="0666", TAG+="systemd"
wpyoga / gist:b07914ee48c931c99f1dcc28243b36e2
Last active June 15, 2023 21:00
attach usb device to qemu via monitor
no need to use port number if only one xhci controller is connected
$ qemu -device qemu-xhci
(qemu) device_add usb-tablet,bus=usb-bus.0,port=1,id=my-tablet
(qemu) device_del my-tablet
(qemu) device_add driver,
vendorid=<hexnr> -- Specifies the vendor ID of the device.
wpyoga / gist:5d4b625ad4c4aaf645657a7093d7bb4f
Last active June 15, 2023 14:52
run qemu monitor on socket
$ qemu-system-i386 [..other params..] -monitor unix:qemu-monitor.socket,server,nowait
$ qemu-system-i386 -monitor telnet:,server,nowait;
$ socat -,echo=0,icanon=0 unix-connect:qemu-monitor-socket
$ telnet 55555
$ nc -N 55555
quit socat with ctrl-c
wpyoga / gist:991e3daf783c2133d083ca0759c34133
Created June 13, 2023 04:18
vscode markdown disable list auto numbering
wpyoga / gist:7505987415194af819b50d378c9f3771
Created May 24, 2023 06:13
get BaseSystem.dmg version info
Ventura, Big Sur, Catalina, Mojave:
7z e -so BaseSystem.dmg 'macOS Base System/System/Library/CoreServices/SystemVersion.plist'
7z e BaseSystem.dmg 5.hfs
7z e -so 5.hfs 'macOS Base System/System/Library/CoreServices/SystemVersion.plist'
High Sierra:
7z e -so BaseSystem.dmg 'OS X Base System/System/Library/CoreServices/SystemVersion.plist'
  1. Register an Azure account

  2. Create a new organization on Azure DevOps

    • Organization settings
      • Security
        • Policies
          • Security policies
            • Allow public projects: ON
  • General