Skip to content

Instantly share code, notes, and snippets.

Ryan Burnette ryanburnette

Block or report user

Report or block ryanburnette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
branneman /
Last active Dec 13, 2019
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

trey / Gruntfile.js
Last active Oct 22, 2018
This is a braindump of the first time I was actually able to get Grunt to do all of what I wanted.
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {},
christianberg /
Last active Oct 13, 2019
Shell script to create a Digital Ocean Droplet and install docker
set -e
if [[ -z $DIGOCEAN_ID ]] || [[ -z $DIGOCEAN_KEY ]]; then
if [ -e $SECRETFILE ]; then
alvarobp /
Last active Jan 18, 2018
Setting up a remote pair station with SSH + TMUX and/or Reverse SSH Tunnel

Disclaimer: The following examples try to give an overview of the process followed in different scenarios. Some commands were actually written from memory. Some tools might exist simplifying all this. Furthermore, I'm no expert so if anyone ever reads this and knows any improvement, please let me know.

Case 1: Direct access to Pairing Station

Given that the Guest User can access the Pairing Station directly, either because the station is publicly available or because NAT port forwarding can be used, there's only one thing we need to do, give ssh access to the Guest User by adding his ssh public key to our Local User (pair) .ssh/authorized_keys file.

The local user would open up a tmux session with

tmux new-session -s pairing
cheeaun /
Last active Oct 18, 2019
JavaScript error logging services
clarkdave / chef-insert-line-if-no-match.rb
Created Jun 13, 2013
[CHEF] Insert a line in a file if it doesn't already exist
View chef-insert-line-if-no-match.rb
line = ' gateway.internal gateway'
file ='/etc/hosts')
file.insert_line_if_no_match(/#{line}/, line)
westonruter / gist:5475349
Last active Feb 6, 2017 — forked from markjaquith/gist:2653957
WordPress Fragment Caching convenience wrapper
View gist:5475349
cache_fragment_output( 'unique-key', 3600, function () {
function cache_fragment_output( $key, $ttl, $function ) {
ggl /
Last active Jul 18, 2019
htpasswd in perl, no need to install apache tools
#!/usr/bin/env perl
# Copyright (c) 2013, Gelu Lupas <>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
tyabe / better_errors_plugin.rb
Created Dec 16, 2012
This is Padrino Plugin for better_errors.
View better_errors_plugin.rb
# Better Errors plugin on Padrino
# Better Errors
group :development do
You can’t perform that action at this time.