{{ message }}

Instantly share code, notes, and snippets.

# Billie Hilton wmhilton

Created Jan 20, 2013 — forked from cscorley/example.tex
View example.tex
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
 \documentclass{jhwhw} \author{Christopher S. Corley} \title{Class homework solutions} \date{October 19, 2011} \begin{document} \problem{Some problem name} blahblah \solution
Last active Dec 18, 2015
Dict Object for JavaScript
View Dict.js
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
 /* * Dict Object for JavaScript (https://gist.github.com/wmhilton/5859079) * Author: William Hilton (wmhilton@gmail.com) * License: http://opensource.org/licenses/MIT * * Say you want something like a Python "dictionary" or a Java "map" where you * are storing (String key, Object value) pairs. It's tempting to do it using * object properties in JavaScript, since * obj['key'] = value * works so conveniently. However, say you want to be able to have some properties
Created Jul 3, 2013 — forked from isaacs/comma-first-var.js
View comma-first-var.js
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
 // See comments below. // This code sample and justification brought to you by // Isaac Z. Schlueter, aka isaacs // standard style var a = "ape", b = "bat", c = "cat", d = "dog",
Created Jul 19, 2013
Use your Arduino as a direct USB to serial converter! Tested on an Arduino Duemilanove. Probably 3.3V TTL but worked for communicating with my supposedly 5V TTL HerkuleX servo at 115200 baud.
View ArduinoSerialBypass.ino
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
 /* * Arduino Serial Bypass - use an Arduino as a dumb USB 2 Serial Converter * * This code makes the Arduino not interfere with pins 0 and 1 * which are connected to RX and TX on the FTDI chip. This allows * the data coming from the FTDI USB 2 Serial chip to flow directly * to another device. Since RX and TX are labeled from the Arduino's * point of view, don't cross the wires, but plug the device's * RX wire into the RX pin 0 and the TX wire into the TX pin 0. *
Last active Aug 29, 2015 — forked from NPashaP/.block
UI for editing tree graph structures
View index.html
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

Created May 21, 2014
git lg: the best git log alias
View git-log-alias.sh
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
 #!/bin/bash git config --global --unset alias.lg; git config --global alias.lg "log --graph --abbrev-commit --decorate --date=relative -10 --format=format:'%C(bold blue)%h%C(reset) %C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(green)(%ar)%C(reset) %C(dim white)- %an%C(reset)'"
Last active Aug 29, 2015
Simple Express Parameter Parsing Demo
View Express Parameter Parsing Demo.md

# Simple Express Parameter Parsing Demo

1. git clone https://gist.github.com/a5656b01c35d6f25dda7.git demo
2. cd demo
3. npm install
4. npm start

Look at the purty code. See how the magic be done.

Created Jan 24, 2015
 CREATE OR REPLACE FUNCTION upsert_user() RETURNS trigger AS $upsert_user$ declare existing record; begin if (select EXISTS(select 1 from users where user_id = NEW.user_id)) then select user_name, user_class, user_age into strict existing from users where user_id = new.user_id;