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
simply.title('Locating...'); | |
navigator.geolocation.getCurrentPosition(function(pos) { | |
var coords = pos.coords; | |
simply.title('Looking up ' + coords.latitude + ', ' + coords.longitude); | |
var fire_url = 'http://data.seattle.gov/resource/kzjm-xkqj.json?' + | |
'$where=within_circle(report_location, ' + coords.latitude + ', ' + coords.longitude + ', 500)&$limit=20'; | |
simply.body(fire_url, true); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bokeh Plot</title> | |
<style> | |
/* BEGIN /usr/local/lib/python2.7/site-packages/bokeh/server/static/css/bokeh.css */ | |
/*! jQuery UI - v1.10.0 - 2013-01-17 | |
* http://jqueryui.com |
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
import urllib2 | |
# Make sure you register your own app token at http://dev.socrata.com/register | |
headers = { | |
"X-App-Token" : "YOUR_APP_TOKEN_HERE" | |
} | |
request = urllib2.Request("https://data.colorado.gov/resource/q2qp-xhnj.json?county=Denver&$limit=50", headers = headers) | |
response = urllib2.urlopen(request) |
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
Compiling Do.Interface.Linux.Docky.dll... | |
./src/Docky.Interface/DockArea_Rendering.cs(57,26): error CS0103: The name `<ActiveIconChangeTime>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_Rendering.cs(57,26): error CS0103: The name `<ActiveIconChangeTime>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_Rendering.cs(59,36): error CS0103: The name `<RenderData>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_Rendering.cs(59,36): error CS0103: The name `<RenderData>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_Rendering.cs(61,22): error CS0103: The name `<PainterOverlayVisible>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_Rendering.cs(61,22): error CS0103: The name `<PainterOverlayVisible>k__BackingField' does not exist in the current context | |
./src/Docky.Interface/DockArea_DragAndDrop.cs(64,27): error CS0103: The nam |
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
# Get sha for a git subtree | |
> git ls-tree branchname dir |
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
# One-liner to see who uses the Seven Dirty Words the most in their code | |
# http://en.wikipedia.org/wiki/Seven_dirty_words | |
find . | grep -v ".git" | while read filename; do git blame $filename 2> /dev/null | \ | |
egrep -i '(shit|piss|fuck|cunt|cocksucker|motherfucker|tits)' | \ | |
perl -ne 'm|\w+\s+\(([\w.-_@ ]+) 200|; print "$1\n";'; done | sort | uniq -c |
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
# One-liner to bulk-reassign Pivotal Tracker stories | |
curl -H "X-TrackerToken: $PIVOTAL_TOKEN" -X GET "http://www.pivotaltracker.com/services/v2/projects/$PROJECT_ID/stories?filter=owner:$OLD_OWNER" | \ | |
egrep '^ <id type' | perl -ne 'm/>(\d+)</; print "$1\n";' | \ | |
while read id; do curl -H "X-TrackerToken: $PIVOTAL_TOKEN" -H "Content-type: application/xml" \ | |
-d "<story><owned_by>$NEW_OWNER</owned_by></story>" -X PUT \ | |
"http://www.pivotaltracker.com/services/v2/projects/$PROJECT_ID/stories/$id"; done |
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
" Chris Metcalf (chris@chrismetcalf.net) | |
" gvim config file | |
" | |
" Get rid of "chrome" | |
set guioptions=cmR | |
" set the X11 font to use. See 'man xlsfonts' on unix/linux | |
set guifont=ProFontWindows:h12.00 | |
" Hide the mouse pointer while typing |
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
" Tab config | |
set smarttab | |
set shiftwidth=2 | |
set autoindent | |
set expandtab | |
" Wrap while searching for strings.... | |
set wrapscan | |
" Wrap at whitespace instead of the middle of a word. |
OlderNewer