Skip to content

Instantly share code, notes, and snippets.

@judge2020
judge2020 / fixgpg.bat
Created Jun 24, 2020
Fix GnuPG/GPG4Win
View fixgpg.bat
REM place this on your desktop and click whenever GPG agent dies
gpgconf --kill gpg-agent
gpg-connect-agent reloadagent /bye
pause
View forever_core_patternb.sh
# sudo su
# crontab -e
2 * * * * mkdir -p -m777 /tmp/cores && echo "/tmp/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
@judge2020
judge2020 / install-buildtools.ps1
Created Jun 12, 2020
Install Visual Studio 2019 Build Tools
View install-buildtools.ps1
cd $env:TEMP
Invoke-WebRequest -Uri "https://aka.ms/vs/16/release/vs_buildtools.exe" -OutFile vs_buildtools.exe
vs_buildtools.exe --wait --norestart --nocache `
--installPath C:\BuildTools `
--add Microsoft.VisualStudio.Workload.MSBuildTools `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Component.TestTools.BuildTools `
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
--add Microsoft.VisualStudio.Component.Windows10SDK.18362 `
@judge2020
judge2020 / README.md
Last active May 16, 2020
github actions echo set env for all steps
View gist:539a39e517bcfbf60fa023eeffc8679f
apt install python ffmpeg
curl -L http://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 https://youtube.com/watch?v=fVLDxmjeyVo
@judge2020
judge2020 / info.md
Last active Jun 12, 2020
qemu/libvirt fox for "There was an error connecting to the Apple ID server" (MacOS in a Virtual Machine)
View info.md

Recently, while setting up a personal MacOS VM using OSX-KVM, I came across an error trying to sign into the Mac App Store and iCloud saying "Validation Error. There was an error connecting to the Apple ID Server".

Many existing threads related to this issue, such as on the tonymacx86 forum, instruct you to make sure your ethernet device is on interface en0, but this was already a thing for my Virtual Machine, so I had to look elsewhere.

Thankfully, "jwegman" from the Unraid forums has instructions for a fix.

Basically, you need to replace the model type vmxnet3 with e1000-82545em, which makes Apple load a different Kext for intel ethernet devices.

    <interface type='bridge'>
@judge2020
judge2020 / generate-client.sh
Created Nov 2, 2019 — forked from Belphemur/generate-client.sh
Generate a new client configuration for WireGuard
View generate-client.sh
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "$0 client-name"
exit 1
fi
View stopabusegithubstar-eng.diff
-Most of the issues in this issue are Korean, so it would be right to reply in Korean.
-I am the owner of this project, and I am
-very grateful for your concern about our developers.
-However, I implicitly agreed to this promotion, which you thought badly and ridiculed, and
-even shared a link to my Facebook feed. I used to threaten my friends to press it once (?).
-Of course, I did not know that so many people would give me a star through this promotion.
-I thought this sudden rise would be like embarrassment and cheating.
@judge2020
judge2020 / Aworker.js
Created May 8, 2019
Cloudflare Workers: block proxy IPs
View Aworker.js
// Using a global variable so we aren't
// pulling from the proxy API on each
// and every subsequent request
// (note that the Workers billing still applies here)
//
// This could be "truly global" with KV but
// it's not really needed here unless the proxy list
// starts blocking CF ips.
//
//
You can’t perform that action at this time.