Skip to content

Instantly share code, notes, and snippets.

View pwlin's full-sized avatar
🎧
Listening to Africa by Toto

pwlin pwlin

🎧
Listening to Africa by Toto
View GitHub Profile
@pwlin
pwlin / tunneling.md
Created October 15, 2023 17:20 — forked from tombowditch/tunneling.md
Tunneling a whole process through wireguard

Tunneling a whole process through wireguard

Certain company blocking a certain hosting provider? No problem, just tunnel the process through a small VPS with wireguard.

Consider server A your blocked server and server B your VPS.

Step 1: Generate a keypair on server A and server B

Server A:

asar extract app.asar test
@pwlin
pwlin / electron-windows-store
Created August 19, 2020 13:56
electron-windows-store
electron-windows-store --input-directory "./in-folder" --output-directory "./out-folder" --package-version 1.0.0.0 --package-name PackageName
https://stackoverflow.com/a/58706318/374577
$ sudo parted /dev/sda resizepart 1
End? [20GB]? 40GB
$ sudo resize2fs /dev/sda1
$ lsblk
$ df -h
iptables -t nat -A PREROUTING -p tcp --dport <origin-port-WAN> -j REDIRECT --to-port <destination-port-LAN>
service iptables save
service iptables restart
iptables -t nat --line-numbers -L
iptables -t nat -D PREROUTING <line-number>
@pwlin
pwlin / VirtualBox numlock weirdness
Last active May 17, 2017 13:05
virtualbox keyboard numlock problem
https://martinvanbeurden.nl/blog/virtualbox-numlock-weirdness/
VBoxManage setextradata "<machine-name>" GUI/HidLedsSync "0"
for /f "tokens=*" %G in ('dir /b /a:d ".\*"') do (VBoxManage setextradata "%G" GUI/HidLedsSync "0")
@pwlin
pwlin / gist:2bdbee3d5d3cc0072495a4acaaf7414f
Created November 2, 2016 08:33
windows explorer drag and drop bug
http://www.tenforums.com/general-support/6868-no-drag-drop-windows-explorer-other-oddities-post834171.html#post834171
Drag-drop in Explorer broke after I removed the Quick Access feature.
Found a fix today.... I think.
All under Registry HKEY_CLASSES_ROOT:
When I searched CLSID for "drag" I found this key: {4657278A-411B-11d2-839A-00C04FD918D0}
called "Shell Drag and Drop helper"
-- well that seems promising, no?
<div style="width:100%;display:flex;flex-flow:wrap;">
<div style="flex:1 100%;overflow:hidden;text-overflow:ellipsis;"></div>
<div style="width:50%"></div>
<div style="width:50%"></div>
</div>
"addon x" might slow firefox bar:
increase the value of browser.addon-watch.percentage-limit or browser.addon-watch.interval
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active April 10, 2024 12:44
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.