Skip to content

Instantly share code, notes, and snippets.


Nic Haynes nicinabox

View GitHub Profile
View pi

Building and tuning a Raspberry Pi security camera


  • Raspberry Pi (I picked up a new 2B)
  • Camera module
  • Wifi adapter
  • Power adapter (5.1V 2.1A)
  • Micro USB
  • Micro SD card
View gist:a856e2fff59b01caf627
# A script to bootstrap dokku.
# It expects to be run on Ubuntu 14.04 via 'sudo'
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
# It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source.
# We wrap this whole script in a function, so that we won't execute
# until the entire script is downloaded.
# That's good because it prevents our output overlapping with wget's.
View mount.js
function (view, selector) {
nicinabox /
Last active October 28, 2015 21:17 — forked from matthewmueller/
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
View tokens.txt
- Change oil, oil filter. 4qt Rotella T6, 0.5 Mobil 1 5W-40
- Change oil, oil filter, air filter, spark plugs
- Oil, oil filter, gearbox oil, rear drive oil, valve adjustment, torque heads
- Change oil and oil filter
- Changed oil and filter
- Changed oil with Castrol GTX 5w-30 and new filter
- New Tensioner - AC Delco (Littens) \nNew O-Ring for Front Crank Sensor\nOil Change (Royal Purple 5w30)
nicinabox / server.js
Created April 12, 2015 16:15
A handy server to use in development
View server.js
var connect = require('connect')
var http = require('http')
var serveStatic = require('serve-static')
var PORT = 8000;
var app = connect()
app.use(serveStatic(__dirname + '/public'))
View makepem
#!/usr/bin/env ruby
class MakePEM
def initialize(argv)
@file = argv[0]
abort help unless valid_args
parts = @file.split('.')
@name = parts.first
nicinabox /
Last active October 24, 2019 07:17
Convert favicon.png to an .ico with multiple sizes
convert favicon.png -bordercolor white -border 0 \
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
\( -clone 0 -resize 64x64 \) \
-delete 0 -alpha off -colors 256 favicon.ico
nicinabox / gist:1a1ba1f846513f30fa4a
Created December 9, 2014 18:23
Source .env automatically in your projects with RVM
View gist:1a1ba1f846513f30fa4a
# ~/.rvm/hooks/after_cd
if [ -f .env ]; then
source .env
View gist:6b0486bb1ce812806f5d
var _ = require('lodash');
var natural = require('natural'),
classifier = new natural.BayesClassifier();
// First item denotes "changed motor oil"
var notes = [
[true, 'Change oil, oil filter, air filter, spark plugs'],
[true, 'Change oil, oil filter. 4qt Rotella T6, 0.5 Mobil 1 5W-40'],
[false, 'Change gearbox oil, rear drive oil, valve adjustment, torque heads'],
[false, 'Change transmission oil'],