Skip to content

Instantly share code, notes, and snippets.

View willwhite's full-sized avatar

Will White willwhite

View GitHub Profile
@willwhite
willwhite / index.html
Last active December 12, 2015 03:48
Add branding with MapBox.js
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<style>
body { margin:0; padding:0; }
@scottjacobsen
scottjacobsen / git+clone+ssh+agent+forward+sudo
Created December 14, 2012 00:07
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like:
@tmcw
tmcw / index.html
Last active April 30, 2016 20:52
Running year-by-year
<html>
<head>
<title>runs over time</title>
<style>
body { margin: 0; padding: 0; background:#f8f8f8; }
svg {
font: 10px sans-serif;
}
path {
stroke: steelblue;
@wboykinm
wboykinm / honeuro.mml
Created January 11, 2012 18:07
Euro Project Doc
{
"bounds": [
-180,
-85.05112877980659,
180,
85.05112877980659
],
"center": [
11.623535156250009,
43.96909818325171,
#city[type='suburb'] {
marker-width: 0.2;
marker-fill: #fc0;
marker-line-width: 0;
marker-allow-overlap: true;
}
#city[type='hamlet'] {
marker-width: 0.4;
marker-fill: #f90;
@willwhite
willwhite / gist:1506819
Created December 21, 2011 17:14
Mapnik installation using brew on Mac OSX 10.7
  1. Install xcode
  2. Install homebrew
  3. Run the commands

.

brew install icu4c
brew link icu4c
brew install boost

brew install proj

@bradland
bradland / ssh-known-hosts-mgmt.sh
Last active April 4, 2023 21:21
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com
@willwhite
willwhite / index.html
Created October 8, 2011 19:59
Modest Maps layer switcher demo
<html>
<head>
<!-- NOTE: Do not use these URLs in production. If they ever change your site will break.
Instead, download the files to your web server and host them there. -->
<script src='https://raw.github.com/mapbox/wax/v3.0.8/ext/modestmaps.min.js' type='text/javascript'></script>
<script src='https://raw.github.com/mapbox/wax/v3.0.8/dist/wax.mm.js' type='text/javascript'></script>
<script src='http://code.jquery.com/jquery-1.6.4.min.js' type='text/javascript'></script>
</head>
<body>
<h3>Choose a layer</h3>
@kkaefer
kkaefer / pull-request
Created September 22, 2011 10:09
Converts an issue into a pull request. Works within one repository only and always pulls a branch into master. Requires github.user and github.token to be set.
#!/bin/sh
BRANCH_NAME=$(git symbolic-ref -q HEAD)
BRANCH_NAME=${BRANCH_NAME##refs/heads/}
BRANCH_NAME=${BRANCH_NAME:-HEAD}
REPO_NAME=`git config --get-regexp remote\..+\.url | perl -p -e 's/^remote\.\w+\.url\s+git\@github.com:(.+).git/\$1/'`
echo "Pulling $BRANCH_NAME into master of $REPO_NAME"
read -p "Issue #: " GITHUB_ISSUE
@stellaraccident
stellaraccident / control-block-http-example1.js
Created March 21, 2011 20:05
Bulletproof node coding snippets
request: function(options) {
var future=new Future();
var req=http.request(options, function(res) {
var text='';
res.setEncoding('utf8');
res.on('data', function(chunk) {
text+=chunk;
});
res.on('end', Block.guard(function() {