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
<?php | |
/** | |
* Quick and dirty script to copy data from one Tumblr to another. | |
* Useful for setting up a test blog for theme development. | |
* | |
* @author Ken Mickles | |
*/ | |
// the blog to copy from |
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
color murphy | |
syntax on | |
set ai | |
set nowrap | |
set nu | |
set ruler | |
set showcmd | |
set nohlsearch | |
set showmatch | |
set backspace=indent,eol,start |
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 | |
# Quick script to migrate some old BDB Subversion repositories I had sitting around to FSFS | |
# All commands come from http://www.hermann-uwe.de/blog/migrating-bdb-svn-repositories-from-one-version-to-another-and-to-fsfs | |
if [ "$1" == "" ]; then | |
echo "Please enter the full repository path" | |
exit | |
fi |
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
/** | |
* This is a _very_ slightly modified version of Chris Pederick's "Add Album To Playlist" bookmarklet: | |
* <http://blog.chrispederick.com/post/6556221838/rdio-add-album-to-playlist-bookmarklet> | |
* | |
*/ | |
(function () { | |
var interval_id = null; | |
var number = 0; |
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
curl -X POST -d "From=3031111111&Body=Test Message" http://localhost:3000/incoming |
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
# act like vim | |
setw -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind-key -r C-h select-window -t :- | |
bind-key -r C-l select-window -t :+ | |
# act like GNU screen |
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
heroku addons:add deployhooks:email \ | |
[email protected] \ | |
--subject="{{app}} was deployed by {{user}}" \ | |
--body="Changes:\n\n{{git_log}}\n\n---\n{{url}}" |
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
http://www.southwest.com/account/rapidrewards/bookCompanion.html?recordLocator={CONFIRMATION_NUMBER}&ss=0 |
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
SELECT | |
name, | |
( 3959 * acos( cos( radians({$lat}) ) * cos( radians( latitude ) ) | |
* cos( radians(longitude) - radians({$lng})) + sin(radians({$lat})) | |
* sin( radians(latitude)))) AS distance | |
FROM {$table} | |
HAVING distance < 1 | |
ORDER BY distance |
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
function geocode($address) { | |
$url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($address) . '&sensor=false'; | |
$response = json_decode(file_get_contents($url), 1); | |
if ( isset($response['results'][0]) ) { | |
$ll = $response['results'][0]['geometry']['location']; | |
return array($ll['lat'], $ll['lng']); | |
} | |
return false; |
OlderNewer