Skip to content

Instantly share code, notes, and snippets.


Andrew Belt AndrewBelt

View GitHub Profile
View generate_gallery.rb
View wat.rb
class Foo
def wat
return 'this is a method'
def bar
if false
wat = 'this is a local variable'
AndrewBelt /
Created Mar 13, 2015
Change your GroupMe profile picture to a random picture of a cat every time you run this script
# Insert account info here
# Access token can be found by opening the Web Inspector console of Chrome or Firefox and looking for the key following "access_token"
# User ID can be found in the console inside the URL that looks like "/user/XXXXXXXX"
curl "$USER_ID" --request POST -v \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0' \
-H 'Accept: application/json, text/plain, */*' \
# alias alphabet
alias a='aunpack' # extract many archive formats avoiding tarbombs
alias c='printf "\ec"' # clear the screen (also Ctrl-L)
alias f='feh -FZ' # view images fullscreen
alias g='grep -ER' # extended recursive grep
alias i='curl' # prints IP address
alias l='ls -lh' # detailed ls
alias m='make -j2' # recursive make (adjust to number of cores)
alias p='xclip -selection clipboard -o' # print clipboard
alias r='vim -R' # read-only vim
AndrewBelt / gist:5650048
Created May 25, 2013
v8 failed to build on 10.7.4
View gist:5650048
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install v8 2>&1
==> Downloading
Already downloaded: /Users/andrew/Library/Caches/Homebrew/v8-3.18.5.tar.gz
tar xf /Users/andrew/Library/Caches/Homebrew/v8-3.18.5.tar.gz
==> make dependencies
make dependencies
svn checkout --force build/gyp \
--revision 1501
A build/gyp/pylib
AndrewBelt / rnasm
Created Jan 11, 2014
This is a shell script that runs your NASM assembly like a scripting language. Now you can finally script in assembly!
View rnasm
NASMFLAGS="-f elf64"
path=/tmp/$(basename $1).$(date +%N)
nasm $NASMFLAGS -o $path.o $1
if [ "$?" == "0" ]; then
ld $LDFLAGS -o $path $path.o
AndrewBelt /
Created Jan 2, 2018
Merges multiple ZIP files into a single ZIP
TMP_DIR=$(mktemp -d)
# Unzip each input ZIP
for IN_NAME in $IN_NAMES; do
unzip -n "$IN_NAME" -d "$TMP_DIR"
# pls + gib
# "Securely" transfer files between two computers, assuming the receiver has an accessible IP address
# Instructions:
# Add this to your .bashrc, and restart your terminal.
# Example session
# on receiver's terminal:
AndrewBelt /
Created May 30, 2018
Convert C++ headers to boilerplate source files
import sys
import re
import os
header_filename = sys.argv[1]
if not header_filename:
raise "No filename given"
# Audible Instruments Patch File Updater
# Migrates VCV patches from AudibleInstrumentsPreview to AudibleInstruments in bulk
# usage:
# python path/to/patches/*.vcv
import sys
import json
You can’t perform that action at this time.