Skip to content

Instantly share code, notes, and snippets.

View mikedamage's full-sized avatar

Mike Green mikedamage

View GitHub Profile
$ curl http://api.wolframalpha.com/v2/query\?input\=1+lightyear+in+inches\&appid\=MY_APPID
@mikedamage
mikedamage / response.xml
Created January 21, 2012 21:23
1 Lightyear in Inches - Wolfram Alpha API
<?xml version='1.0' encoding='UTF-8'?>
<queryresult success='true'
error='false'
numpods='6'
datatypes=''
timedout=''
timing='0.78'
parsetiming='0.259'
parsetimedout='false'
recalculate=''
@mikedamage
mikedamage / response.xml
Created January 21, 2012 21:20
1 Lightyear in Minutes - from Wolfram Alpha API
<?xml version='1.0' encoding='UTF-8'?>
<queryresult success='true'
error='false'
numpods='4'
datatypes=''
timedout=''
timing='2.038'
parsetiming='0.279'
parsetimedout='false'
recalculate=''
@mikedamage
mikedamage / gist:1638294
Created January 19, 2012 06:10
Wolfram Alpha API request
http://api.wolframalpha.com/v2/query?input=QUERY_HERE&appid=APP_ID_HERE
@mikedamage
mikedamage / led_candle.pde
Created December 30, 2011 18:41
LED candle w/ ambient light sensor
#include <TrueRandom.h>
#define LED1 9
#define LED2 10
#define LED3 11
#define BUTTON 13
void setup() {
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
@mikedamage
mikedamage / Usage.html
Created December 30, 2011 17:49
Combiner usage example
<!DOCTYPE html>
<html>
<head>
<title>Combiner Usage Example</title>
<!-- Stylesheet usage -->
<link rel="stylesheet" type="text/css" href="/combiner.php?files[]=css/blueprint.css&amp;files[]=css/screen.css" />
</head>
<body>
<h1></h1>
@mikedamage
mikedamage / project.md
Created December 29, 2011 02:55
PHP Project Idea for Mike

PHP/MySQL Project Spec

Summary

Design and develop a PHP and MySQL based script that concatenates text files based on query string input, then caches the resulting concatenation in a database table.

Functionality

The script should work like this:

@mikedamage
mikedamage / pumm.pde
Created December 28, 2011 18:47
Functions to make an LED breathe, or "pumm"
void pummOn(int pin, int fadeIncr, int delayTime) {
for (int i = 0; i < 256; i += fadeIncr) {
analogWrite(pin, i);
delayMicroseconds(delayTime);
}
}
void pummOff(int pin, int fadeIncr, int delayTime) {
for (int i = 255; i >= 0; i -= fadeIncr) {
analogWrite(pin, i);
# Tmux Custom Config
# Custom Color Scheme
set -g status-bg blue
set -g status-fg white
set-window-option -g window-status-current-bg white
set-window-option -g window-status-current-fg black
# Key Bindings
unbind %
@mikedamage
mikedamage / magic.awk
Created October 27, 2011 14:31
James's Jade Pipe Code
while(( "cat "a[2]"."a[1] " | "a[1] " -o {}" | getline result) > 0){
print result;
}