Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar

Benjamin Lupton balupton

View GitHub Profile
# i18n Group
The i18n api mock.
## The translation API [/i18n/{id}{?locale}]
+ Parameters
+ locale (required, string, `de_DE`)
+ id (required, int, 1)
anonymous
anonymous / priv
Created September 3, 2014 22:39
My journal
#!/bin/bash
gpg_id='my@email.address.ca'
inv_dir="$HOME/.priv"
gpg_cmd='gpg'
edit_cmd='emacs'
pager_cmd='less'
if [ $# -ge 2 ]; then
op=$1
@trevnorris
trevnorris / perf-flame-graph-notes.md
Last active December 24, 2023 05:25
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@balupton
balupton / README.md
Last active July 4, 2018 18:15
Purchasing/Booking Flights Checklist

Purchasing/Booking Flights Checklist

Way before booking

  1. Visas
    1. Check out visa requirements
    2. Ensure you will have enough time to satisfy visa requirements. I generally minus 2 days from the maximum in case there are delays and whatnot.

Before Booking

#!/bin/zsh
#
# Highlight a given file and copy it as RTF.
#
# Simon Olofsson <simon@olofsson.de>
#
set -o errexit
set -o nounset
@balupton
balupton / README.md
Last active December 23, 2015 12:09
A comparison of animal vs plant products
@bewest
bewest / README.md
Last active February 28, 2017 01:49
using travis-ci to build using docpad, and publish to github pages

use travis-ci to publish to github

Demo

docpad

The docpad-plugin-ghpages uses the following information to stitch a new repo with contents of ./out directory onto root of your gh-pages branch:

  • git config user.email
  • git config user.name
@jhs
jhs / rant.md
Last active December 10, 2015 09:18
Rant about Node.js library logging

What I want for library logging

I write Node.js libraries, and I want logging. Why is this so problematic?

Note, I am despairing about how library authors log stuff not how application builders decide on a logging framework.

Hopefully this document can become a spec or feature list for code I will write some day.

The antipattern

@balupton
balupton / DocPad Nifties.md
Last active October 13, 2015 20:07
DocPad Nifties