Skip to content

Instantly share code, notes, and snippets.

View brotich's full-sized avatar
🏠
Working from home

Brian Rotich brotich

🏠
Working from home
  • Nairobi,Kenya
View GitHub Profile
@brotich
brotich / gist:f14687d070a36566d26d8e592dccc684
Created October 8, 2020 08:00 — forked from philipz/gist:04a9a165f8ce561f7ddd
Debian ARM64 (Aarch64) image for QEMU
QEMU version: 2.2.0
HDD init: qemu-img create -f qcow debian8-arm64.img 10G

Netinstall initrd: http://ftp.ru.debian.org/debian/dists/jessie/main/installer-arm64/20150107/images/netboot/debian-installer/arm64/initrd.gz
Netinstall kernel: wget http://ftp.ru.debian.org/debian/dists/jessie/main/installer-arm64/20150107/images/netboot/debian-installer/arm64/linux

Netinstall start:
 qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic -smp 1 -m 512 -kernel linux -initrd initrd.gz -append "root=/dev/ram console=ttyAMA0" -global virtio-blk-device.scsi=off -device virtio-scsi-device,id=scsi -drive file=debian8-arm64.img,id=rootimg,cache=unsafe,if=none -device scsi-hd,drive=rootimg -netdev user,id=unet -device virtio-net-device,netdev=unet -net user
@brotich
brotich / gist:8b99ed8b55c81fb5adf847682c19cb08
Created September 28, 2020 06:15 — forked from lemenkov/gist:2947110
How to convert from any video format to mkv with ffmpeg/libav w/o recompressing
# "-fflags +genpts" - add this to regenerate packet timestamps (in case of error "Can't write packet with unknown timestamp")
./ffmpeg -fflags +genpts -i "/media/nfs/Nostromo/video/Japan Sinks (Nihon Chinbotsu) 1973 - WMV/NihonChinbotsu_1973.wmv" -acodec copy -vcodec copy ~/Desktop/NihonChinbotsu_1973.mkv
@brotich
brotich / curl.sh
Last active April 9, 2019 14:56 — forked from exAspArk/curl.sh
Test CORS with cURL
curl -I -X OPTIONS \
-H "Origin: http://EXAMPLE.COM" \
-H 'Access-Control-Request-Method: GET' \
http://EXAMPLE.COM/SOMETHING 2>&1 | grep -i 'Access-Control-Allow-Origin'
@brotich
brotich / gitcheats.txt
Created January 16, 2018 21:21 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get a list of all commit messages for a repo
git log --pretty=format:'%s'
# push changes to an empty git repository for the first time
git push --set-upstream origin master
# delete first 10 branches of remote excluding master