Skip to content

Instantly share code, notes, and snippets.

View AndrewBelt's full-sized avatar

Andrew Belt AndrewBelt

  • VCV
  • Tennessee, USA
View GitHub Profile
@AndrewBelt
AndrewBelt / cat.sh
Created March 13, 2015 00:41
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"
ACCESS_TOKEN=''
USER_ID=''
JSON_PAYLOAD='{"user":{"image_url":"http://thecatapi.com/api/images/get","avatar_url":"http://thecatapi.com/api/images/get"}}'
curl "https://v2.groupme.com/users/$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, */*' \
class Foo
def wat
return 'this is a method'
end
def bar
if false
wat = 'this is a local variable'
else
@AndrewBelt
AndrewBelt / rnasm
Created January 11, 2014 05:46
This is a shell script that runs your NASM assembly like a scripting language. Now you can finally script in assembly!
#!/bin/sh
NASMFLAGS="-f elf64"
LDFLAGS=
path=/tmp/$(basename $1).$(date +%N)
nasm $NASMFLAGS -o $path.o $1
if [ "$?" == "0" ]; then
ld $LDFLAGS -o $path $path.o
@AndrewBelt
AndrewBelt / gist:5650048
Created May 25, 2013 17:51
v8 failed to build on 10.7.4
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install v8 2>&1
==> Downloading https://github.com/v8/v8/archive/3.18.5.tar.gz
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 http://gyp.googlecode.com/svn/trunk build/gyp \
--revision 1501
A build/gyp/pylib