Skip to content

Instantly share code, notes, and snippets.

View jywarren's full-sized avatar

Jeffrey Warren jywarren

View GitHub Profile
@jywarren
jywarren / zoom hashes in Google Maps
Created April 18, 2011 06:18
Live URL hash updating as you drag a Google Map around. That way the URL is always the permalink for your current viewport.
function makeLink() {
location.hash = "#/"+map.getCenter().lat().toFixed(3)+"/"+map.getCenter().lng().toFixed(3)+"/"+map.getZoom();
}
function initialize() {
var query = location.search.substring(1);
var lat = 0.5;
var lng = 0.5;
<lens>
<maker>Pentax</maker>
<model>SMC PENTAX DA 12-24mm F/4 ED AL IF</model>
<mount>Pentax KAF2</mount>
<cropfactor>1.5</cropfactor>
<calibration>
<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
jywarren / localwiki-install-error-transcript.txt
Created December 6, 2011 23:50
LocalWiki install error transcript
Database 'localwiki' with username 'localwiki' created!
Get a Cloudmade API Key.
1. Go to http://cloudmade.com/register
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:
e1cdd6df85e44b16932beedcf0868c56
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/manage.py", line 57, in main
@jywarren
jywarren / end-of-pg_hba.conf
Created December 7, 2011 01:37
end of pg_hba.conf
# Database administrative login by UNIX sockets
local all postgres ident
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all md5
# IPv4 local connections:
#host all all 127.0.0.1/32 md5
# IPv6 local connections:
@jywarren
jywarren / blinkm-maxm-rgb-knob.ino
Created December 8, 2011 17:12
BlinkM MaxM RGB color from a knob
/*
* BlinkKnobHue -- Example of how to use a pot to set BlinkM hue
*
*
* For more info on how to use pots and analog inputs see:
* http://www.arduino.cc/en/Tutorial/AnalogInput
*
* BlinkM connections to Arduino
* PWR - -- gnd -- black -- Gnd
* PWR + -- +5V -- red -- 5V
@jywarren
jywarren / hsv_rgb_led_thermistor.ino
Created December 8, 2011 18:05
HSV RGB LED from thermistor
#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
jywarren / ArduinoTemperatureFlashlight.ino
Created December 12, 2011 22:32 — forked from kylemcdonald/ArduinoTemperatureFlashlight.ino
Thermal Flashlight RGB LED + Melexis 90614
#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
jywarren / ThermalFlashlight.ino
Created December 12, 2011 22:39
Thermal Flashlight (RGB LED + Melexis 90614 + Arduino)
// See http://bildr.org/2011/02/mlx90614-arduino/ 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 http://publiclaboratory.org/tool/thermal-camera
#include <i2cmaster.h>
#include "Wire.h"
//#include "BlinkM_funcs.h"
@jywarren
jywarren / related_maps.php
Created December 21, 2011 00:41
Related maps in PLOTS website (drupal)
upon "expound"
thrice.dost_thou do
speaketh("Hark!")
verily
ponder(1..3)
verily