Skip to content

Instantly share code, notes, and snippets.

View dtudury's full-sized avatar

David Tudury dtudury

  • Oakland, California, USA
View GitHub Profile
@dtudury
dtudury / page1.js
Last active August 29, 2015 13:57
/*
javascript:(function () {
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://rawgit.com/dtudury/9501081/raw/881aa3218effc7c8d108b5537fe18e427b246e98/page1.js');
document.body.appendChild(jsCode);
}());
*/
var numbers = "0123456789";
function randomNumber() {
return numbers.charAt(Math.floor(Math.random() * numbers.length));
@dtudury
dtudury / page2.js
Last active August 29, 2015 13:57
/*
javascript:(function () {
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://rawgit.com/dtudury/9501738/raw/f383c0de610467b8b81d38b263772bb663b04ceb/page2.js');
document.body.appendChild(jsCode);
}());
*/
var numbers = "0123456789";
function randomNumber() {
return numbers.charAt(Math.floor(Math.random() * numbers.length));

##Liquid Sugar: combine

  • 4 cups white sugar
  • 1 1/2 cups water
  • 1/4 teaspoon cream of tartar

in a covered pot over low heat for at least 30 minutes; makes 4 cups

because 4 cups contains 4 cups of sugar it's a very good substitute for granulated sugar. Boiling it with the cream or tartar inverts some of the sucrose creating a sweeter combination of sugars less prone to crystallization. The higher sugar content also increases the shelf-life.

#!/usr/bin/osascript
-- run as something like `./run_in_panes.scpt "echo a" "echo b"`
on run argv
set numCmds to count of argv
set numCols to round numCmds ^ 0.5 rounding up
set numRows to round numCmds / numCols rounding up
launch "iTerm"
@dtudury
dtudury / keybase.md
Created August 4, 2014 17:26
keybase.md

Keybase proof

I hereby claim:

  • I am dtudury on github.
  • I am dtudury (https://keybase.io/dtudury) on keybase.
  • I have a public key whose fingerprint is BF35 8F92 0C77 AD10 5A80 62D7 577E AC54 B305 E554

To claim this, I am signing this object:

@dtudury
dtudury / bbb
Created May 31, 2013 20:51
up and running with bbb
# install xcode from app store
# install node from nodejs.org
sudo npm install -g yo grunt-cli bower
npm install generator-bbb
npm install generator-mocha
yo bbb
@dtudury
dtudury / smartos server traffic
Last active December 17, 2015 23:18
watch traffic on port 1443
#write traffic on port 1443 to test.txt
sudo snoop -I net1 -x0 -o test.txt port 1443
#print traffic on port 1443 verbose
sudo snoop -I net1 -x0 -v port 1443
@dtudury
dtudury / gist:5734395
Created June 8, 2013 07:21
make osx apps launch with decent path
sudo echo "setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" > /etc/launchd.conf
/*
* lights.c
*
* Created: 6/14/2013 11:30:35 PM
* Author: dtudury
*/
#ifndef F_CPU
#define F_CPU 1000000UL // or whatever may be your frequency
#endif
@dtudury
dtudury / knob.c
Created June 25, 2013 04:35
avr-studio C code for sparkfun's LED RingCoder Breakout - RGB https://www.sparkfun.com/products/11040
/*
* knob.c
*
* Created: 6/22/2013 9:01:18 PM
* Author: dtudury
*/
#ifndef F_CPU
#define F_CPU 8000000UL // or whatever may be your frequency
#endif