Hello and welcome to my (pretty much empty) site!
I make music, I code, I DJ, I eat tea.
You can listen to my music here:
I also have Twitter where I spam random nonsensical stuff — feel free to chat up with me there, I won't bite… unless you want me to.
I also have some projects in various stages of completeness (and abandonment):
This site is mainly used as my personal notepad for random scribbles – In some situations it's very hard to google them later. To avoid wasting my time I'm putting them up here. So here they go. In random order.
close(2)
with enabled SO_LINGER
results in block even if socket is nonblocking, blocks for linger_timeout
at most.Snippets:
main() { int array[100] = {104, 5}; /* initializes rest to 0 */ struct blah {int a; int b; char c; void* d;} blah = {10}; /* initializes rest to 0 */ return 0; }
gcc -march=native -Q --help=target
alternatively more verbose
gcc -fverbose-asm -x c - -S -o - < /dev/null
diff -uw <(gcc -fverbose-asm -march=haswell -x c - -S -o - < /dev/null | sed "1,/options enabled/d") <(gcc -fverbose-asm -march=native -x c - -S -o - < /dev/null | sed "1,/options enabled/d")
gcc -dM -E - < /dev/null | sort
git ls-files --deleted -z | git update-index --assume-unchanged -z --stdin
pkg-config --variable pc_path pkg-config
Snippets:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA none hfs rw,noauto
find directory | rev | sort | rev | tar cv -T - --no-recursion | xz > directory.tar.xz
echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/zz-local-tame
tinker panic 0
awk '!x[$0]++'
diff -u <(sort /etc/passwd) <(shuf /etc/passwd | sort)
for i in $pidlist; do gdb -batch -n -ex 'thread apply all bt' -p "$i"; done
printf "[default]\nsigning_required=no\n" | sudo tee /etc/nsmb.conf >/dev/null sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server SigningRequired -bool FALSE sudo /usr/libexec/smb-sync-preferences
fbcon=map:99
lldb -p `pgrep Dropbox` expr (int)setiopolicy_np(0, 0, 3) quit
sudo sysctl debug.lowpri_throttle_enabled=0
sudo scutil --set HostName <newname>
sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false && sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
sudo defaults read /Volumes/Time\ Machine\ Backups/Backups.backupdb/*/Latest/.exclusions.plist
mount -vuwo noatime /Volumes/FADownloader
mkdir Backups.backupdb
prlctl set <MachineName> --on-window-close keep-running
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool FALSE
defaults write -g com.apple.mouse.scaling -1
gui/
instead of user/
if it doesn't work:sudo launchctl bootout user/$(id -u <username>)
reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device" /v DevicePasswordLessBuildVersion /t REG_DWORD /d 0 /f