Skip to content

Instantly share code, notes, and snippets.

@antitree
antitree / Halloween_Brain0.1.pde
Last active September 7, 2018 10:59
Example Arduino code to run a neopixel for my Halloween brain
#include <Adafruit_NeoPixel.h>
//Hacked from the original Adafruit library demo
#define PIN 6 //my control pin
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
@antitree
antitree / gist:5905486
Created July 1, 2013 23:16
Longify without making a direct connection
import requests
def longify(url):
try:
r = requests.get(url, allow_redirects=False)
if r.status_code = 301:
lurl = r.headers['location']
return lurl
return url
except:
@antitree
antitree / Tweetcollect.py
Created June 22, 2013 02:06
Example of using the 1.1 twitter API to collect tweets for a user since they shut down the 1.0 API.
#!/usr/bin/python
#
# Author: Antitree
# Description: Example of using the new Twitter 1.1 API to
# collect all the tweets from a user.
#
# Derived from tsileo
# https://gist.github.com/tsileo/4637864/raw/9ea056ffbe5bb88705e95b786332ae4c0fd7554c/mytweets.py
#
@antitree
antitree / gist:5237253
Created March 25, 2013 13:53
ISTS X autoshell pwner
import requests
import time
from optparse import OptionParser
timeout = 5
parser = OptionParser()
parser.add_option("-x", dest="host",
help="Choose an individual host to test")
@antitree
antitree / pumpkins.arduino
Created October 31, 2012 01:34
Stupid halloween pumpkins
/*
Stupid Pumpkins
v0.03
*/
unsigned char upDown=1; // start off going UP
int cylon=0;
int leds=11; // number of LEDs plugged in
int demo=1;
int count=0;
@antitree
antitree / onionporn.py
Created October 27, 2012 02:40
Python implementation of Tor's password hashing OpenPGP S2K algorithm
import os, binascii, hashlib
#supply password
secret = 'foo'
#static 'count' value later referenced as "c"
indicator = chr(96)
#used to generate salt
rng = os.urandom