Skip to content

Instantly share code, notes, and snippets.

View dannydb's full-sized avatar

Danny DeBelius dannydb

View GitHub Profile
@dannydb
dannydb / Custom.css
Created December 14, 2012 20:43
Chrome Devtools Monokai Theme
/*
Chrome Developer Tools - Monokai Color Theme
Author: Béres Máté Csaba / bjmatt.com / @bjmatt / beres.mate@bjmatt.com
-----------------------------------------------------------------------------------------------------------
Installation:
1. Find your Chrome's user stylesheet's directory, for example in win7:
"c:\Users\***YOUR USERNAME***\AppData\Local\Google\Chrome\User Data\Default\User StyleSheets\"
import { downTo } from './helpers';
export class Bottles {
song() {
return this.verses(99, 0);
}
verses(start, end) {
return downTo(start, end)
.map((i) => this.verse(i))
import { downTo } from './helpers';
export class Bottles {
song() {
return this.verses(99,0);
}
verses(start, end) {
const versesToSing = [];

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:

@dannydb
dannydb / ex1.rb
Created September 11, 2012 13:54
Spoof user agent with open-uri
rpage = open(remote_full_url,
"User-Agent" => "Mozilla/5.0 (...) Firefox/3.0.6").read
@dannydb
dannydb / grid.js
Created February 12, 2019 21:37
Doxy Grid
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({
@dannydb
dannydb / gist:9e8ca69eba06b976da55
Last active December 1, 2017 06:50
Tile map post

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.

@dannydb
dannydb / README.md
Last active December 28, 2015 03:58 — forked from mbostock/.block

This variation of a stacked bar chart shows percentages rather than absolute numbers.

@dannydb
dannydb / README.md
Last active December 28, 2015 03:49 — forked from mbostock/.block

A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode different packages of the Flare visualization toolkit. Treemap design invented by Ben Shneiderman. Squarified algorithm by Bruls, Huizing and van Wijk.

@dannydb
dannydb / index
Last active December 24, 2015 08:39
<html>
<head>
<title>Open the nytimes app</title>
<meta http-equiv="refresh" content="0;URL=nytimes://" />
<link rel="apple-touch-icon-precomposed" href="http://graphics8.nytimes.com/webapps/skimmer/2.4/images/skmr_256.png"/>
</head>
</html>