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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
### Keybase proof | |
I hereby claim: | |
* I am smarthall on github. | |
* I am smarthall (https://keybase.io/smarthall) on keybase. | |
* I have a public key whose fingerprint is A7FC 317E A9D0 5A34 45E7 2BCD 8AD9 D99E 2E0A 44E2 | |
To claim this, I am signing this object: |
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 "lifx.h" | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <string.h> |
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
// Settings | |
#define PLAYER_NUM 1 | |
#define PIN_SQUELCH 5 | |
// Constants | |
#define USB_PKT_SIZE 8 | |
#define USB_KEY_START 2 | |
#if PLAYER_NUM == 1 | |
#define PIN_COUNT 15 |
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 <stdlib.h> | |
/* | |
Returns a pointer to the first occurrence of character in the C string str. | |
The terminating null-character is considered part of the C string. Therefore, | |
it can also be located to retrieve a pointer to the end of a string. | |
@param str the string to be searched | |
@param len the number of characters to search | |
@param character the character to search for |
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
#!/bin/sh | |
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
# Uses curl to be compatible with machines that don't have wget by default | |
LINODE_API_KEY=licensekey | |
DOMAIN_ID=domainid | |
RESOURCE_ID=resourceid | |
WAN_IP=`curl -s http://example.com/whatsmyip.php` | |
if [ -f $HOME/.wan_ip.txt ]; then |
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
//We always have to include the library | |
#include "LedControl.h" | |
LedControl lc=LedControl(10,11,12,1); | |
unsigned long delaytime=100; | |
void setup() { | |
Serial.begin(9600); |
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
// This file has moved into the glassfridge project. | |
// Find it here: https://github.com/smarthall/glassfridge | |
#include <SoftwareSerial.h> | |
// software serial #1: TX = digital pin 2, RX = digital pin 3 | |
SoftwareSerial xbee(2, 3); | |
unsigned long nextreport; | |
#define REPORTINT 10000UL |
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
#!/bin/bash | |
# To use: | |
# Plug the left display into pin 24 on connector P9 | |
# Plug the right display into pin 21 on connector P9 | |
if [ -f /sys/devices/bone_capemgr*/slots ]; then | |
# Create and setup the UART devices if needed | |
if [ -f /dev/ttyO1 ]; then | |
echo BB-UART1 >/sys/devices/bone_capemgr*/slots |
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
function pve { | |
VENVFILE="$HOME/usr/venv/$1/bin/activate" | |
if [ -f $VENVFILE ]; then | |
source $VENVFILE | |
else | |
virtualenv $HOME/usr/venv/$1 | |
source $VENVFILE | |
fi | |
} |
OlderNewer