This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder