This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
// Disable bold. | |
term_.prefs_.set('enable-bold', false) | |
// Use this for Solarized Dark | |
term_.prefs_.set('background-color', "#002b36"); | |
term_.prefs_.set('foreground-color', "#839496"); | |
term_.prefs_.set('color-palette-overrides', [ | |
'#073642', | |
'#dc322f', |
This example shows basic usage of mdbtools to extract CSV/SQL from Microsoft databases, but also involves a fairly convoluted Bash loop. For a simpler example, go here: Using mdbtools to extract CSV data from the FAA Wildlife Strike Database
Use mdbtools: https://github.com/brianb/mdbtools
If you're on a Mac, you can install mdbtools via homebrew:
brew install mdbtools
#!/usr/bin/env python | |
# Quick and dirty demonstration of CVE-2014-0160 by | |
# Jared Stafford (jspenguin@jspenguin.org) | |
# Modified so that it finds cookies | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
#!/usr/bin/env ruby | |
cmds = [] | |
cmds << "git co gh-pages" | |
cmds << "git merge master" | |
cmds << "git push github gh-pages" | |
cmds << "git co master" | |
system cmds.join("&&") |
Open Source code doesn’t always come in big complex packages. At ProPublica we sometimes share small, simple snippets of using GitHub "Gists." These Gists range from single-byte file delimiters to an entire JavaScript framework for making stepper graphics. They rarely have documentation and don’t even always have names, but they can be super-useful. Here are some we’ve shared over the past few years:
// MIXINS | |
vendor(prop, args) | |
-webkit-{prop} args | |
-moz-{prop} args | |
-o-{prop} args | |
{prop} args | |
animation() | |
vendor('animation', arguments) |
# This is a shell function to quickly grab the data for a given Landsat 8 tile ID from Google's servers | |
# For example: | |
# l8get LC81690352014169LGN00 | |
# The echo at the end is to remind myself of the syntax for extracting bands 8, 4, 3, and 2. (Pansharp, Red, Green, Blue) | |
# On OSX this would go into your ~/.bash_profile file. | |
# Requires gsutil from https://developers.google.com/storage/docs/gsutil_install | |
# Most useful in conjunction with USGS' Earth Explorer: http://earthexplorer.usgs.gov/ |
/* | |
Usage: | |
When generating a page: | |
var abTest = new AbTest('your-test-slug'); | |
if (abTest.variation == 0) | |
$('#thediv').addClass('red'); | |
else if (abTest.variation == 1) |