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 "Arduino.h" | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 4 | |
#define LED_COUNT 60 | |
// Create an instance of the Adafruit_NeoPixel class called "leds". | |
// That'll be what we refer to from here on... | |
Adafruit_NeoPixel leds = Adafruit_NeoPixel(LED_COUNT, PIN, NEO_GRB + NEO_KHZ800); |
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 "Arduino.h" | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 4 | |
#define LED_COUNT 60 | |
// Create an instance of the Adafruit_NeoPixel class called "leds". | |
// That'll be what we refer to from here on... | |
Adafruit_NeoPixel leds = Adafruit_NeoPixel(LED_COUNT, PIN, NEO_GRB + NEO_KHZ800); |
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 styleCode() | |
{ | |
if (typeof disableStyleCode != "undefined") | |
{ | |
return; | |
} | |
var a = false; | |
$("pre code").parent().each(function() |
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
parseFloatSafe: function(v) { | |
// A more sane parseFloat function | |
// - Verifies number in a sensible format and returns NaN otherwise. Sensible format = (#,000.##..) or (#.##) or (#,000) or (#) | |
// - supports scientific notation (E[-+]?###) | |
// - null / empty string return null | |
// - non-string types are converted to string and parsed that way | |
if (v === null) {return null;} | |
var tmp = ('' + v).trim(); | |
if (tmp === '') {return null;} | |
if (tmp.match('^[-+]{0,1}[0-9]+([,]{0,1}[0-9]{3}){0,4}([.][0-9]+){0,1}([eE][-+]{0,1}[0-9]+){0,1}$')) { |
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
if (navigator.userAgent.toLowerCase().indexOf("firefox") !== -1) { | |
// Firefox/Mozilla automatically adds a "bonus" row to textareas. Through CSS, force the height back to the number of rows specified before | |
// autosize sees it. | |
var height = parseFloat(input.css("line-height")) * opt.rows + parseFloat(input.css("padding-top")) + parseFloat(input.css("padding-bottom")); | |
input.css("height", height + "px"); | |
} | |
_.defer(function() { | |
input.autosize(); | |
}); |
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 blink = function(element, style, times, duration, done) | |
{ | |
var orig = {}; | |
_.each(_.keys(style), function(k) { | |
orig[k] = element.css(k); | |
}); | |
var blinkOnce = function(count) { | |
console.debug(times); | |
element.animate(style, {duration: duration, complete:function() { | |
element.animate(orig, {duration: duration, complete:function() { |
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
#!/usr/bin/env python | |
# DICEWARE WORD LIST FROM: | |
# http://world.std.com/~reinhold/diceware.html | |
lines = """11111 a | |
11112 a&p | |
11113 a's | |
11114 aa | |
11115 aaa |
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
#!/usr/bin/env python | |
import os | |
import string | |
import sys | |
import random | |
# ===================================================== | |
CMIN=0x20 | |
CMAX=0x7E |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.TeamFoundation.Client; | |
using Microsoft.TeamFoundation.TestManagement.Client; | |
using Microsoft.TeamFoundation.WorkItemTracking.Client; | |
using System.Net; |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.ServiceModel; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Web; | |
using System.Text; |