- We try to uphold the commit message standards as recommended by Torvalds.
- See https://github.com/torvalds/subsurface/blob/master/README#L161-176
- Please only commit code that you actually wrote.
#include "Wire.h" | |
#include "BlinkM_funcs.h" | |
#define blinkm_addr 0x00 | |
#define blinkm1_addr 0x09 | |
#define blinkm2_addr 0x10 | |
int spectrumReset=5; | |
int spectrumStrobe=4; | |
int spectrumAnalog=0; //0 for left channel, 1 for right. |
#!/bin/bash | |
pins=( 4 25 24 23 22 21 18 17 ) | |
for pin in "${pins[@]}"; do | |
echo $pin > /sys/class/gpio/export | |
echo "out" > /sys/class/gpio/gpio${pin}/direction | |
sleep 0.1 | |
done |
from hd44780 import HD44780 | |
import ctypes | |
from time import sleep | |
class CameraFilePath(ctypes.Structure): | |
_fields_ = [('name', (ctypes.c_char * 128)), | |
('folder', (ctypes.c_char * 1024))] | |
gp = ctypes.CDLL('libgphoto2.so.2') |
from hd44780 import HD44780 | |
from os import stat | |
from time import sleep | |
lcd = HD44780() | |
lcd.message(" Quake3 Logger\nCommence killing...") | |
logfile_name = 'game.log' |
USER='lrvick' | |
cd /data/local/arch | |
if ! mountpoint -q dev; then | |
mount -t proc /proc proc | |
mount -o bind /dev dev | |
mount -o bind /dev/pts dev/pts | |
fi |
from flask import Flask, request, redirect, url_for | |
from rauth.service import OAuth1Service, OAuth2Service | |
github = OAuth2Service( | |
name='github', | |
consumer_key='GITHUB_CONSUMER_KEY', | |
consumer_secret='GITHUB_CONSUMER_SECRET', | |
access_token_url='https://github.com/login/oauth/access_token', | |
authorize_url='https://github.com/login/oauth/authorize', | |
) |
var baez = (function(){ | |
var stopwords = ['i','in','and','to','are','the','but','my','they','those','them','you','a'] | |
function tokenize(sample){ | |
var tokens = [] | |
sample.split(' ').forEach(function(token){ | |
if (baez.stopwords.indexOf(token) & /^[a-zA-Z0-9]+$/.test(token)){ |
import eventlet | |
from eventlet.green import urllib2 | |
def request(): | |
urllib2.urlopen("http://yourtarget.com").read() | |
print "%s request sent" | |
pool = eventlet.GreenPool(size=1000) | |
while True: |
// convert 0..255 R,G,B values to binary string | |
RGBToBin = function(r,g,b){ | |
var bin = r << 16 | g << 8 | b; | |
return (function(h){ | |
return new Array(25-h.length).join("0")+h | |
})(bin.toString(2)) | |
} | |
// convert 0..255 R,G,B values to a hexidecimal color string | |
RGBToHex = function(r,g,b){ |