Skip to content

Instantly share code, notes, and snippets.


Jeffrey Warren jywarren

View GitHub Profile
jywarren / zoom hashes in Google Maps
Created Apr 18, 2011
Live URL hash updating as you drag a Google Map around. That way the URL is always the permalink for your current viewport.
View zoom hashes in Google Maps
function makeLink() {
location.hash = "#/"+map.getCenter().lat().toFixed(3)+"/"+map.getCenter().lng().toFixed(3)+"/"+map.getZoom();
function initialize() {
var query =;
var lat = 0.5;
var lng = 0.5;
View LensFun XML database format
<model>SMC PENTAX DA 12-24mm F/4 ED AL IF</model>
<mount>Pentax KAF2</mount>
<distortion model="poly3" focal="12" k1="-0.01919" />
<distortion model="poly3" focal="15" k1="-0.00774" />
<distortion model="poly3" focal="18" k1="-0.00345" />
<distortion model="poly3" focal="21" k1="-0.00199" />
jywarren / localwiki-install-error-transcript.txt
Created Dec 6, 2011
LocalWiki install error transcript
View localwiki-install-error-transcript.txt
Database 'localwiki' with username 'localwiki' created!
Get a Cloudmade API Key.
1. Go to
2. After you've signed in, click "Get an API Key". Fill out the form (details don't matter)
3. Paste the API key below:
Traceback (most recent call last):
File "/usr/bin/localwiki-manage", line 9, in <module>
load_entry_point('localwiki==0.2.beta.12', 'console_scripts', 'localwiki-manage')()
File "/usr/lib/pymodules/python2.6/sapling/", line 57, in main
View end-of-pg_hba.conf
# Database administrative login by UNIX sockets
local all postgres ident
# "local" is for Unix domain socket connections only
#local all all md5
# IPv4 local connections:
#host all all md5
# IPv6 local connections:
jywarren / blinkm-maxm-rgb-knob.ino
Created Dec 8, 2011
BlinkM MaxM RGB color from a knob
View blinkm-maxm-rgb-knob.ino
* BlinkKnobHue -- Example of how to use a pot to set BlinkM hue
* For more info on how to use pots and analog inputs see:
* BlinkM connections to Arduino
* PWR - -- gnd -- black -- Gnd
* PWR + -- +5V -- red -- 5V
jywarren / hsv_rgb_led_thermistor.ino
Created Dec 8, 2011
HSV RGB LED from thermistor
View hsv_rgb_led_thermistor.ino
#include <math.h>
double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15; // Convert Kelvin to Celcius
//Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
jywarren / ArduinoTemperatureFlashlight.ino
Created Dec 12, 2011 — forked from kylemcdonald/ArduinoTemperatureFlashlight.ino
Thermal Flashlight RGB LED + Melexis 90614
View ArduinoTemperatureFlashlight.ino
#include <i2cmaster.h>
#include "Wire.h"
#include "BlinkM_funcs.h"
const float lowReading = 75;
const float highReading = 110;
const int blinkm_addr = 0;
const unsigned char separatorCharacter = 255;
void setup(){
jywarren / ThermalFlashlight.ino
Created Dec 12, 2011
Thermal Flashlight (RGB LED + Melexis 90614 + Arduino)
View ThermalFlashlight.ino
// See for i2c library and instructions
// You must download the "twimaster.cpp" and "i2cmaster.h" files, and place them in a folder called "I2Cmaster". This must be placed in a folder called "libraries" which in turn should be placed in your Sketchbook folder (see Arduino's Preferences menu item to see where this is on your machine.).
// Typically, once you install these files, you must relaunch Arduino.
// The extra files are included in this Gist, as well as attached to the page
#include <i2cmaster.h>
#include "Wire.h"
//#include "BlinkM_funcs.h"
jywarren / related_maps.php
Created Dec 21, 2011
Related maps in PLOTS website (drupal)
View related_maps.php
View shakespeare.rb
upon "expound"
thrice.dost_thou do