Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🧙‍♀️
Working on Dorothy, a dotfile ecosystem

Benjamin Lupton balupton

🧙‍♀️
Working on Dorothy, a dotfile ecosystem
View GitHub Profile
@jodiecunningham
jodiecunningham / awscheck.sh
Created August 9, 2015 15:04
AWS Startup on-demand script
#!/bin/sh
# Install the AWS CLI, set up an IAM user for the instance(s) you want to control.
# Pull the AWS keys for the IAM user and run aws configure to add them.
# I run this on Sophos UTM and have Sophos run a reverse proxy from the \
# $ROUTERIP:32400 to $PLEXHOST:32400
# set -x
# started with screen -Sdm a '/root/bin/awscheck.sh'een -Sdm a '/root/bin/awscheck.sh'screen -Sdm a '/root/bin/awscheck.sh'screen -Sdm a '/root/bin/awscheck.sh'n -Sdm a '/root/bin/awscheck.sh'
PLEXHOST=dokie.duckdns.org
WANIF=eth2
@balupton
balupton / README.md
Last active January 14, 2017 03:36
Thoughts on a new CMS

Some thoughts on a new CMS, in different progressions.

@getify
getify / gist:2b53198906d320abe650
Created March 23, 2015 17:02
ES6 highlight reel
function foo(x) { x = (typeof x != "undefined") ? x : 10; .. }
function foo(x = 10) { .. }
function foo(x,y,z) { .. }; foo.apply(null,[1,2,3]);
function foo(x,y,z) { .. }; foo(...[1,2,3]);
function foo() { var args = [].slice.call(arguments); .. }
function foo(...args) { .. }
var o = { x: 2, y: 3 }, x = o.x, y = o.y, z = (typeof o.z != "undefined") ? o.z : 10;
@balupton
balupton / README.md
Last active January 14, 2017 03:40
Problems

This gist is used to contain list of issues I've encountered with entities. Luckily, all have been resolved.

# 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='[email protected]'
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 <[email protected]>
#
set -o errexit
set -o nounset