Skip to content

Instantly share code, notes, and snippets.

View corbanb's full-sized avatar

corban baxter corbanb

View GitHub Profile
@corbanb
corbanb / cities.json
Created October 16, 2017 21:39 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
function create_branch_pr {
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
remote=$(git config remote.origin.url | cut -d. -f1-2)
echo "$remote/compare/develop...updates/$branch"
}
alias opr='open -a /Applications/Google\ Chrome.app $(create_branch_pr)'
@corbanb
corbanb / post-merge
Created May 20, 2016 23:59 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@corbanb
corbanb / profanity.csv
Created May 9, 2016 22:56 — forked from tjrobinson/profanity.csv
Profanity list for use with content filters
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
amcik
arse
arsehole
arserape
arsewipe
ass
asses
asshole
assholes
assramer
#!/bin/bash
if [ "$GIT_SSH_KEY" != "" ]; then
echo "Cleaning up SSH config" >&1
echo "" >&1
# Now that npm has finished running,
# we shouldn't need the ssh key/config anymore.
# Remove the files that we created.
rm -f ~/.ssh/config
rm -f ~/.ssh/deploy_key
@corbanb
corbanb / gist:76d0658493e93830af48
Last active February 28, 2020 22:02 — forked from kirley/gist:3913166
Setting up PostGIS for Timezone Lookup
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
@corbanb
corbanb / developer-setup.md
Last active August 29, 2015 13:59 — forked from saetia/gist:1623487
OSX - PHP/Ruby/Node - Developer Setup
var App = App || {};
App.Helpers = App.Helpers || {};
(function($) {
'use strict';
App.Helpers.Numbers = {
[Mensch font](http://robey.lag.net/2010/06/21/mensch-font.html),
[Webkit](http://webkit.org),
[Chrome](http://google.com/chrome),
[Firefox](http://firefox.com),
[Kaleidoscope](http://www.kaleidoscopeapp.com),
[iTerm](http://iterm2.com),
[Transmit](http://panic.com/transmit),
[Coda](http://panic.com/coda),
[Sublime Text](http://www.sublimetext.com/dev),
[Sequel Pro](http://nightly.sequelpro.com),