Skip to content

Instantly share code, notes, and snippets.

View wpyoga's full-sized avatar

William Poetra Yoga wpyoga

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

editorconfig

.editorconfig

root = true

[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
@wpyoga
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
dmesg
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
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
wpyoga / gist:b07914ee48c931c99f1dcc28243b36e2
Last active June 15, 2023 21:00
attach usb device to qemu via monitor
https://qemu-project.gitlab.io/qemu/system/devices/usb.html
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
wpyoga / gist:5d4b625ad4c4aaf645657a7093d7bb4f
Last active June 15, 2023 14:52
run qemu monitor on socket
https://unix.stackexchange.com/questions/426652/connect-to-running-qemu-instance-with-qemu-monitor
$ qemu-system-i386 [..other params..] -monitor unix:qemu-monitor.socket,server,nowait
$ qemu-system-i386 -monitor telnet:127.0.0.1:55555,server,nowait;
$ socat -,echo=0,icanon=0 unix-connect:qemu-monitor-socket
$ telnet 127.0.0.1 55555
$ nc -N 127.0.0.1 55555
quit socat with ctrl-c
@wpyoga
wpyoga / gist:991e3daf783c2133d083ca0759c34133
Created June 13, 2023 04:18
vscode markdown disable list auto numbering
https://github.com/yzhang-gh/vscode-markdown/issues/283
@wpyoga
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'
Monterey:
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