- 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.
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') |
#!/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 |
#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. |
async.waterfall [ | |
(cb) -> | |
if user?.id | |
models.execute User, 'find', user.id, (err,user) -> | |
cb null, err, userModel | |
else | |
cb null, null, null | |
(err, userModel, cb) -> |
app.controller( 'AppCtrl', function ($scope, socket) { | |
socket.onopen( | |
function(){ | |
console.log('Socket is connected :D') | |
} | |
) | |
socket.onclose( | |
function(){ | |
console.log('Socket is disconnected :(') | |
} |
/** | |
* ## Fetch Data | |
* | |
* @param {String} key Data source to request | |
* @param {Boolean} use_storage set/get from localStorage | |
* @param {Object} request JSON formatted request for server | |
* | |
* @return {Object} a $q.defer().promise for the data requested | |
* | |
*/ |
{ | |
"directory": "app/lib" | |
} |
/** | |
* # Global logging module | |
* | |
* This is a global set of hooks that catch all $log messages sent out by the | |
* application. Currently they are simply passed off directly to console.log | |
* but this could be updated later to allow them to be stored locally, sent to | |
* a server etc. | |
*/ | |
angular.module('ngLogging', []) |
function jsSort(items){ | |
var steps = 0 | |
items.sort(function(a,b){ | |
steps = steps+1 | |
return a-b | |
}) | |
return [items,steps] | |
} | |