Skip to content

Instantly share code, notes, and snippets.

Avatar

David Luu daluu

View GitHub Profile
@daluu
daluu / QEMU_ON_M1.md
Created May 5, 2022 05:34 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon
View QEMU_ON_M1.md

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@daluu
daluu / shell_and_mac_notes.txt
Created February 25, 2022 01:04
Notes for Mac and shell cmds/scripts
View shell_and_mac_notes.txt
shopt -s globstar
alias get-checksum='cd $1; find -type f -exec md5sum {} + | tee $2; cd -'
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip'
alias fixvpn="sudo route -n flush && sudo networksetup -setv4off Wi-Fi && sudo networksetup -setdhcp Wi-Fi"
@daluu
daluu / webhooks.txt
Created November 1, 2019 16:01
webhooks stuff
View webhooks.txt
https://webhook.site
@daluu
daluu / py_env_notes.txt
Last active November 14, 2019 16:59
python env notes
View py_env_notes.txt
various python related commands to run relating to envs
apt-get -y update && apt-get -y --force-yes --fix-missing install build-essential python-dev
pip install virtualenv
virtualenv --system-site-packages -p python3 venv3
source venv3/bin/activate
. venv3/bin/activate
@daluu
daluu / zkcheck.sh
Created October 24, 2019 16:21
zk status check
View zkcheck.sh
#!/bin/sh
# use either option below
echo ruok | nc zksvr 2181
echo srvr | nc zksvr 2181
@daluu
daluu / docker_notes.txt
Last active February 25, 2022 01:06
Docker notes
View docker_notes.txt
docker system prune --volumes
docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash circleci/node:12
# get compressed size of docker images (after they're pulled locally)
docker save image-name:latest > sizetest.tar
gzip sizetest.tar
ls -lh sizetest.tar.gz
# see https://github.com/docker/docker/issues/1143
@daluu
daluu / custom_rf_docker_image_notes.txt
Created April 7, 2019 22:01
Notes for building custom Robot Framework docker images
View custom_rf_docker_image_notes.txt
Below are various notes to help if building a custom RF docker image that we don't already have publicly available,
e.g. IronPython-based RF docker image, Java/Jython-based RF docker image.
java -jar jython_installer-<version>.jar
# Robot Framework 3.0 supports Jython 2.7 which requires Java 7 or newer.
jython -m ensurepip
jython -m pip install robotframework
@daluu
daluu / go_get_private_repos.txt
Last active November 25, 2022 18:33 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
View go_get_private_repos.txt
```bash
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
```
@daluu
daluu / git_gh_notes.md
Last active May 2, 2022 23:07
git and github notes
View git_gh_notes.md