- augend + addend = sum
- minuend - subtrahend = difference
- multiplicand * multiplier = product
- dividend / divisor = quotient
- dividend % divisor = remainder
- base ^ exponent = power
- degree √ radicand = root
- log ? base ? power = exponent
This file contains hidden or 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
/* | |
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)); |
This file contains hidden or 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
// 0) I have xcode installed everywhere, I'm not sure that's a dependency but... | |
// I'm not going to uninstall it to test the theory | |
// 1) download and install crosspack: http://www.obdev.at/products/crosspack/download.html | |
// (you may need to go into "security & privacy" and take osx out of nanny-mode) | |
// 2) with the controller unplugged open a console and type `ls /dev/tty.*` | |
// 3) plug it in and type `ls /dev/tty.*` again... make a note of the new device | |
// 4) `cd ~/Documents` | |
// 5) `avr-project 7-segment` | |
// 6) `cd 7-segment/firmware` | |
// 7) edit the Makefile |
This file contains hidden or 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
#!/usr/bin/env node | |
//install this script from the root of the local repo with something like... | |
//mkdir -p .git/hooks ; curl -L https://gist.github.com/dtudury/6629720/raw > .git/hooks/pre-commit ; chmod +x .git/hooks/pre-commit | |
var EXEC = require('child_process').exec; | |
var JSHINT = require('jshint').JSHINT; | |
var FS = require('fs'); | |
This file contains hidden or 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 index = 0; | |
function makeDummyData() { | |
return JSON.stringify({t: +new Date(), rand: Math.random(), i: index++, v: 'nodesy'}); | |
} | |
var config = { | |
subdomain: cred.account, | |
auth: { | |
username: cred.username, | |
password: cred.password |
This file contains hidden or 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
/* | |
* lights2.c | |
* | |
* Created: 6/24/2013 10:06:23 PM | |
* Author: dtudury | |
*/ | |
#ifndef F_CPU | |
#define F_CPU 8000000UL // or whatever may be your frequency | |
#endif |
This file contains hidden or 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 toBoolean = !!trueFalsy; | |
var isPresent = ~string.indexOf(substring); | |
var mSecEpoch = +new Date; |
This file contains hidden or 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
#!/usr/bin/env node | |
//install this script from the root of the local repo with something like... | |
//mkdir -p .git/hooks ; curl -L https://gist.github.com/dtudury/6060115/raw > .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg | |
var fs = require('fs'); | |
//0 is "node", 1 is the path to this script, 2 is the commit message | |
var commit = fs.readFileSync(process.argv[2]).toString(); | |
if(!/\b[A-Z][A-Z]+-[0-9]+\b/.test(commit) && !/^Merge /.test(commit)) { | |
console.log("[SHAME] no JIRA issue key found in commit"); |
This file contains hidden or 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
/* | |
* !node nestedDomains | |
* --- | |
* error caught at 1: Error: depth reached | |
* error caught at 2: Error: rethrow from depth 1 | |
* error caught at 3: Error: rethrow from depth 2 | |
* error caught at 4: Error: rethrow from depth 3 | |
* --- | |
* | |
* this makes sense based on the implication from 4th paragraph on implicit binding |
This file contains hidden or 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
//git clone https://gist.github.com/5914750.git | |
//node 5914750/nodeCampAttack | |
var classes = 8; | |
var schedules = 1; for(var i = 2; i <= classes; i++) schedules *= i; //8! | |
var mistakeRate = 0.1; //10% chance that a participant doesn't follow their schedule | |
var hitChance = 0.5; //what we're solving for | |
var missChance = 1; //100% (can't collide without participants) | |
var participant = 1; |