Skip to content

Instantly share code, notes, and snippets.

Danny DeBelius dannydb

Block or report user

Report or block dannydb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View grid.js
import { Platform } from 'react-native'
const GRID_VALUE = 8
const NUDGE_VALUE = 4
const getGridDimension = (increment = 1) => increment * GRID_VALUE
const getNudgeDimension = () => NUDGE_VALUE
const getPlatformMargin = () => {
return Platform.select({
View README.md

Automate a reminder to pack your laptop

I don't usually take my work laptop home each evening, but once in awhile I do, and a fraction of those times I've neglected to pack the deck the next morning because it's not part of my usual morning routine.

Here's a quick fix, using iCloud reminders, a neat (free!) app called ControlPlane and a couple of short scripts.

1. Install ControlPlane

Get ControlPlane by using Cask:

View gist:9e8ca69eba06b976da55

Let’s Tesselate

A hexagon tile grid, square tile grid and geographic choropleth map. Maps by Danny DeBelius and Alyson Hurt

A hexagon tile grid, square tile grid and geographic choropleth map. Maps by Danny DeBelius and Alyson Hurt

As the saying goes, nothing is certain in this life but death, taxes and requests for geographic data to be plotted on a map.

When that data is associated with geographic areas, the choropleth map is a tried and true visualization technique, but not without significant dangers depending on the nature of the data and map areas represented. Clarity of mapped state-level data, for instance, is frequently complicated by the reality that most states in the western U.S. carry far more visual weight than the northeastern states.

View gist:167e50c6d16e37e04156
# Sometimes yosemite crashes with a gunicorn server up
# and when it comes back up there is a python process blocking port 8000
# kill that process with this function
# http://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac
function killport() {
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9
}
@dannydb
dannydb / workon_project.applescript
Last active Aug 29, 2015
Open tab in iTerm and setup pane for server and git/fab commands
View workon_project.applescript
tell application "iTerm"
activate
set projectSlug to the text returned of (display dialog "Which project?" default answer "")
tell the current terminal
activate current session
-- launch dailygraphics tab
View gist:74399d474ed14da3637b
tell application "iTerm"
activate
tell the current terminal
activate current session
-- launch dailygraphics tab
launch session "Default Session"
tell the last session
set name to "1-dailygraphics"
View Fine Rotate Left
tell application "System Events"
set frontmostProcess to name of first item of (processes whose frontmost is true)
tell process frontmostProcess
tell window 1
set oldSize to get size
-- change + to - for shrinking
-- change 100 to 5 for fine-tune mode
set newWidth to (item 1 of oldSize) - 5
set size to {newWidth, item 2 of oldSize}
end tell
View Ryan's Rush Timeline
Working Man
In The End
Bastille Day
2112 Overture
Closer To The Heart
The Trees
The Spirit Of Radio
YYZ
Subdivisions
Distant Early Warning
View keybase.md

Keybase proof

I hereby claim:

  • I am dannydb on github.
  • I am dannydb (https://keybase.io/dannydb) on keybase.
  • I have a public key whose fingerprint is D3FE A983 0152 C28D A6A4 CA87 234D 2E3D 8611 6734

To claim this, I am signing this object:

You can’t perform that action at this time.