Skip to content

Instantly share code, notes, and snippets.

@haugstrup
haugstrup / lcd.js
Created July 29, 2012 17:15
LCD proof of concept for johnny-five
// Wire up LCD as described here:
// http://learn.adafruit.com/character-lcds/overview
var five = require("johnny-five"),
board, lcd;
board = new five.Board();
board.on("ready", function() {
@kmiyashiro
kmiyashiro / admin.html
Created May 10, 2012 21:02
Mocha HTML spec
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../libs/mocha.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div id="mocha"></div>
<script src="../libs/mocha.js" type="text/javascript" charset="utf-8"></script>
@jed
jed / LICENSE.txt
Created May 10, 2011 14:44 — forked from 140bytes/LICENSE.txt
route client urls with 404s and pattern captures
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@csnover
csnover / README.md
Created February 21, 2011 01:11
Gyazo script
  1. Change $path and $uri as necessary in gyazo.php and upload it to your server
  2. Change HOST and CGI as necessary in script and use it to replace Gyazo.app/Contents/Resources/script (right-click -> Show Package Contents to get there)
  3. Continue along as usual
@cowboy
cowboy / javascript-type-stuff.js
Created February 16, 2011 16:13
JavaScript Type Stuff
// ============================================================
// Objects vs Primitives
// To make a long story short, use primitives wherever you can.
// ============================================================
// Primitive types: Null, Undefined, Number, Boolean, String.
var num1 = 9000,
num2 = new Number( 9000 ),
str1 = "hello world",
# Tips for jQuery Bug Patching
# There are some assumptions made here, one being that you're
# set up with some form of "localhost" http server and that it's running.
# - http://www.mamp.info/en/mamp/
# - sudo apt-get install apache2
# Get it running:
# On Mac:
dojo.provide("plugd.layout");
(function(d){
var clsCache = {},
doit = function(part){
// do some mangling:
var dtype = part.type, kids = part.children;
if(!clsCache[dtype]){ clsCache[dtype] = d.getObject(dtype); }
if(part.id){ part.props.id = part.id; }
@paulirish
paulirish / gist:292907
Created February 2, 2010 18:50
ascii art that's perfect for code comments
/* __
/ _)
.-^^^-/ /
__/ /
<__.|_|-|_|
*/
/*_/|
=0-0=