Skip to content

Instantly share code, notes, and snippets.

@garcia
garcia / autotumble.py
Last active February 9, 2018 15:16
Automatically follow Tumblr users who post in the #follow-back tag and reblog posts from the Dashboard. Requires python-oauth2, a Tumblr blog, a Tumblr appication's consumer key/secret pair, and an authentication key/secret pair for the blog / application. Potentially useful for future social engineering escapades.
#!/usr/bin/env python
import itertools
import json
import logging
import sys
import time
import traceback
# oauth2 is available at https://github.com/simplegeo/python-oauth2
import oauth2
@garcia
garcia / gifpalettes.py
Created September 17, 2012 06:47
Losslessly rotate a GIF's hue 180 degrees
#!/usr/bin/env python
import colorsys
import struct
import sys
f_in = open(sys.argv[1], 'rb')
f_out = open(sys.argv[2], 'wb')
# check header
if f_in.read(3) != 'GIF':
raise TypeError('not a GIF')