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
static int i_seen = 0; | |
%} | |
WC [A-Za-z'] | |
NW [^A-Za-z'] | |
%start INW NIW | |
%% |
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
./produce.py produce 32c570d1d07756d92eb1a0e1cb3afbc60bfd5a94 ea8da467c44d4e3f2327b9346f0869787aa8342a | |
{"message":"derp"} | |
./consume.py consume 32c570d1d07756d92eb1a0e1cb3afbc60bfd5a94 489a92e768b4904fcf62b866017990d6f3af96d9 | |
{"presence":{"from":{"resource":"489a92e768b4904fcf62b866017990d6f3af96d9"},"type":"available"}} | |
{"presence":{"from":{"resource":"ea8da467c44d4e3f2327b9346f0869787aa8342a"},"type":"available"}} | |
{"presence":{"from":{"swarm":"32c570d1d07756d92eb1a0e1cb3afbc60bfd5a94","resource":"ea8da467c44d4e3f2327b9346f0869787aa8342a"}}} |
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
# Internal Ethernet lacks EEPROM for MAC address so each reboot it gets | |
# random one. In effect it appears as usb0 but we prefer to have it as eth0 | |
ACTION=="add", KERNEL=="omap-backlight", SUBSYSTEM=="platform", RUN+="/sbin/modprobe bug_backlight" | |
KERNEL=="ttyS1", SUBSYSTEMS=="tty", RUN+="/etc/udev/scripts/bt_init.sh" | |
ACTION=="add", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh" | |
ACTION=="remove", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh" | |
KERNEL=="ttyS0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI2" | |
KERNEL=="ttySC0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI0" | |
KERNEL=="ttySC1", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI3" |
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 | |
# | |
# /etc/init.d/ppp: start or stop PPP link. | |
# | |
# If you want PPP started on boot time (most dialup systems won't need it) | |
# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and | |
# follow the instructions in the comments in that file. | |
#test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 | |
if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi |
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 | |
export ARCH=arm | |
#export CROSS_COMPILE=arm-angstrom-linux-gnueabi- | |
export CROSS_COMPILE=arm-linux-gnueabi- | |
unset CPATH | |
echo "Nuking output directory" | |
rm -rf install/lib | |
rm install/boot/* | |
set -e |
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
# Located in /etc/udev/rules.d/00-bug20.rules | |
# Internal Ethernet lacks EEPROM for MAC address so each reboot it gets | |
# random one. In effect it appears as usb0 but we prefer to have it as eth0 | |
ACTION=="add", KERNEL=="omap-backlight", SUBSYSTEM=="platform", RUN+="/sbin/modprobe bug_backlight" | |
KERNEL=="ttyS1", SUBSYSTEMS=="tty", RUN+="/etc/udev/scripts/bt_init.sh" | |
ACTION=="add", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh" | |
ACTION=="remove", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh" | |
KERNEL=="ttyS0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI2" | |
KERNEL=="ttySC0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI0" |
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
root@chipkit:/etc# cd /etc | |
root@chipkit:/etc# rm timezone | |
root@chipkit:/etc# rm localtime | |
root@chipkit:/etc# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime | |
root@chipkit:/etc# ln -s /usr/share/zoneinfo/America/New_York /etc/timezone | |
root@chipkit:/etc# date | |
Fri Jul 13 15:15:07 EDT 2012 |
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
#define BUFFLEN 200 | |
#define NUMLEDS 5 | |
#define MAXVALUES 3 | |
#define ACT_FADEUP 1 | |
#define ACT_FADEDOWN 2 | |
#define ACT_BLINK 3 | |
int leds[] = {3, 5, 6, 9, 10}; | |
int act[NUMLEDS]; |
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
var WebSocket = require('ws') | |
, ws = new WebSocket('ws://api.cosm.com:8080/'); | |
var API_KEY = "" //ENTER API KEY HERE. | |
ws.on('open', function() { | |
ws.send('{"headers":{"X-ApiKey":"'+API_KEY+'"}, "method":"subscribe", "resource":"/feeds/61916/datastreams/sine60"}'); | |
}); | |
ws.on('message', function(message) { | |
console.log('received: %s', message); | |
}); |
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
POST /stream?resource_id=c7cf00fc21622a15f15bd390a698af3f34efd9bc&swarm_id=0d86ad8e7f33d4c9bb33d38ef9295f897a636523 HTTP/1.1 | |
Host: api.bugswarm.net | |
Accept: application/json | |
X-BugSwarmApiKey: 7a849e6548dbd6f8034bb7cc1a37caa0b1a2654b | |
Connection: close | |
User-Agent: SwarmSessionImp | |
Transfer-Encoding: chunked | |
Content-Type: application/json ;charset=UTF-8 | |
X-Forwarded-For: 69.195.32.42 |
OlderNewer