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
/* | |
An Albers Equal Area Conic projection in javascript, for protovis. | |
For centering the contiguous states of the USA in a 800x400 div, I used: | |
var scale = pv.Geo.scale(albers(23, -96, 29.5, 45.5)) | |
.range({ x: -365, y: -375 }, { x: 1200, y: 1200 }); | |
http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html |
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
These are some helpful Git resources that I found while climbing the learning curve. | |
Feel free to append / modify | |
======================= | |
== UNDERSTANDING GIT == | |
======================= | |
* The Git Parable | |
- http://tom.preston-werner.com/2009/05/19/the-git-parable.html | |
- "Read this parable all the way through and you should have very little trouble mastering the various Git commands and wielding the awesome power that Git makes available to you." |
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 | |
//absolute path to wp-load.php, or relative to this script | |
//e.g., ../wp-core/wp-load.php | |
include( 'trunk/wp-load.php' ); | |
//grab the WPDB database object, using WP's database | |
//more info: http://codex.wordpress.org/Class_Reference/wpdb | |
global $wpdb; |
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
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
var d=document, | |
w=window, | |
e=w.getSelection, | |
k=d.getSelection, | |
x=d.selection, | |
s=(e?e():(k)?k():(x?x.createRange().text:0)), | |
l=d.location, | |
e=encodeURIComponent, | |
metas=d.head.getElementsByTagName('meta'), | |
imgs=d.body.getElementsByTagName('img'), |
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 casper scipt checks for 404 internal links for a given root url. | |
* | |
* Usage: | |
* | |
* $ casperjs 404checker.js http://mysite.tld/ | |
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
*/ | |
/*global URI*/ |