var board = require('tessel');
var net = board.net;
console.log('opening tcp socket');
console.log('connecting to', process.env.DEPLOY_IP);
var client = net.connect(3000, process.env.DEPLOY_IP, function () {
console.log('writing');
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
/* | |
Let's say I have this html | |
<table id="switchesTbl"> | |
<tr> | |
<td><div class="addButton" type="switch"></div></td> | |
<td><div class="createLabel">Switch</div></td> | |
<td><input type="text" class="createInput" value="s1"/></td> | |
<td><div class="createLabel">Description</div></td> | |
<td><input type="text" class="createInput" value="d1"/></td> | |
<td><div class="createLabel">Default</div></td> |
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
http://stackoverflow.com/questions/52704/how-do-you-discard-unstaged-changes-in-git | |
git stash save --keep-index | |
git stash drop |
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
// http://pastebin.com/KMcwGrS8 | |
public class ScrollableGridView extends GridView { | |
boolean expanded = true; | |
public ScrollableGridView(Context context) | |
{ | |
super(context); | |
} |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="AARON" | |
# Example aliases |
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
uint8_t watchdog_count = 0; | |
ISR(WDT_vect) { | |
// This vector is for the watchdog timer | |
PORTA = PORTA | (1 << LED ); // The LED never goes on | |
++watchdog_count; | |
} | |
ISR(PCINT0_vect) | |
{ |
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
→ write HCI_CMND_SOCKET -> request to open socket... | |
← read HCI_EVNT_SOCKET <- socket #0 opened. | |
→ write HCI_CMND_SETSOCKOPT 22 bytes: <Buffer 00 00 00 00 ff ff 00 00 02 00 00 00 08 00 00 00 02 ...> | |
← read HCI_EVNT_SETSOCKOPT 4 bytes: <Buffer 2f 7b 08 00> | |
→ write HCI_CMND_SETSOCKOPT 24 bytes: <Buffer 00 00 00 00 ff ff 00 00 01 00 00 00 08 00 00 00 04 ...> | |
← read HCI_EVNT_SETSOCKOPT 4 bytes: <Buffer 00 00 00 00> | |
→ write HCI_CMND_SOCKET -> request to open socket... | |
← read HCI_EVNT_SOCKET <- socket #1 opened. | |
→ write HCI_CMND_SETSOCKOPT 24 bytes: <Buffer 01 00 00 00 ff ff 00 00 00 40 00 00 08 00 00 00 04 ...> | |
← read HCI_EVNT_SETSOCKOPT 4 bytes: <Buffer ff ff ff ff> |
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
← read HCI_EVNT_SOCKET <- socket #1 opened. | |
→ write HCI_CMND_SETSOCKOPT 24 bytes: <Buffer 01 00 00 00 ff ff 00 00 00 40 00 00 08 00 00 00 04 ...> | |
← read HCI_EVNT_SETSOCKOPT 4 bytes: <Buffer ff ff ff ff> | |
→ write HCI_CMND_CONNECT -> connecting socket #1... (8.8.8.8) | |
← read HCI_EVNT_CONNECT 4 bytes: <Buffer 00 00 00 00> | |
→ write DATA 46 'bytes:' <Buffer 01 00 00 00 0c 00 00 00 1d 00 00 00 00 00 00 00 df ...> | |
← read HCI_EVNT_SEND 8 bytes: <Buffer 01 00 00 00 1d 00 00 00> | |
→ write HCI_CMND_SELECT → r .1.. w .... e .1.. [non-blocking, timeout: 3750ms] | |
← read HCI_EVNT_SELECT ← r .1.. w .... e .... [status 1] | |
→ write HCI_CMND_RECVFROM 12 bytes: <Buffer 01 00 00 00 01 10 00 00 00 00 00 00> |
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
/* global console */ | |
/* global require */ | |
var tessel = require('tessel'); | |
var http = require('http'); | |
var mainLoop = function() { | |
var options = { | |
hostname: '192.168.1.106', | |
port: 3000, |
OlderNewer