Skip to content

Instantly share code, notes, and snippets.

View dannydb's full-sized avatar

Danny DeBelius dannydb

View GitHub Profile
@iamkilo
iamkilo / addglow.ps1
Last active June 13, 2019 20:10
This adds the cool Synthwave 84' theme by Robb Owen to VSCode for you.
Param(
[switch]$installExtensions,
[switch]$downloadCSS
)
if ($installExtensions.IsPresent) {
code --install-extension robbowen.synthwave-vscode
code --install-extension be5invis.vscode-custom-css
}
@jeremyjbowers
jeremyjbowers / fix_ur_postgres.sh
Created February 11, 2015 16:32
A quickie shell script for fixing your Postgres installation on a Mac when migrating from 9.3.5 to 9.4.1 via homebrew.
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
initdb /usr/local/var/postgres9.4 -E utf8
pg_upgrade -v \
-d /usr/local/var/postgres \
-D /usr/local/var/postgres9.4 \
-b /usr/local/Cellar/postgresql/9.3.5_1/bin/ \
-B /usr/local/Cellar/postgresql/9.4.1/bin/
mv /usr/local/var/postgres /usr/local/var/postgres9.3
mv /usr/local/var/postgres9.4 /usr/local/var/postgres
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@TylerFisher
TylerFisher / LICENSE
Last active August 29, 2015 14:08
This code will refresh all users on your webpage upon deployment of a timestamp.json file to S3. We used this to deploy hotfixes on election night for elections.npr.org. It requires Fabric (a Python library for running tasks on the command line) and jquery-cookie.js, but could easily be refactored to not.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@rdmurphy
rdmurphy / problems.md
Last active August 29, 2015 14:07
Yosemite Upgrade Problems

Problems I Had With OS X Yosemite (10.10)

PostgreSQL Wouldn't Start

Tried to run postgres -D /usr/local/var/postgres and got this:

FATAL: could not open directory "pg_tblspc": No such file or directory

An easy fix. The Yosemite install blows away some empty directories that PostgreSQL expects.

@onyxfish
onyxfish / README.md
Last active January 2, 2023 14:37
Google Spreadsheets script to generate slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing
@ryanpitts
ryanpitts / Ryan's Rush Timeline
Created April 1, 2014 20:24
Just one song from each Rush studio album, in chronological order.
Working Man
In The End
Bastille Day
2112 Overture
Closer To The Heart
The Trees
The Spirit Of Radio
Limelight
Subdivisions
Distant Early Warning
@ashaw
ashaw / sankey.js
Last active August 29, 2015 13:56
var Sankey = function(opts) {
this.opts = opts;
this.el = $("#" + this.opts.el);
this.graphsReady = 0;
this.graphWidth = this.el.width();
};
Sankey.prototype.initPaper = function() {
this.paper = Raphael(document.getElementById(this.opts.el));
};
@yurivictor
yurivictor / Preferences.sublime-settings
Last active December 21, 2015 14:29
Sublime user settings
{
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"draw_indent_guides": true,
"draw_white_space": "selection",
"file_exclude_patterns":
[
".DS_Store",
@parisminton
parisminton / commaify.js
Created July 8, 2013 17:44
This function will automatically insert commas after the thousands place of any number. Returns a string. Useful for calculations that appear in copy. Call 'commaify(some_dynamic_integer);'
function commaify (num) {
var num_string,
i,
len,
threes = [],
remainders;
num_string = num.toString();
len = num_string.length;
remainders = len % 3;