Skip to content

Instantly share code, notes, and snippets.

At harbour

John Barton joho

At harbour
View GitHub Profile
xmeng1 / wsl2-network.ps1
Created Jul 14, 2019
WSL2 Port forwarding port to linux
View wsl2-network.ps1
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
joho / hecate.yml
Last active Jun 4, 2019
Reference configuration for Hecate Dispatch
View hecate.yml
# Required: an admin contact for errors, billing issues, and the like
# Optional: timezone for when to send and how to format emails
# defaults to "Australia/Melbourne"
timezone: "Australia/Melbourne"
# Required: config for shipping news (notify on merged PRs)
# Array of release notifications to send
plasticine / help.makefile
Last active Aug 28, 2019
Automatically extract help from your Makefiles using some fully sick awk hacks
View help.makefile
# You're looking at it! :)
@makehelp < $(MAKEFILE_LIST)
.PHONY: help
andrewk /
Last active Jan 3, 2018
Jasmine 2.0 quick reference


Create a spy

// "bare" spy
var spy = jasmine.createSpy('spyName');

// Mock object of spies:, spy.current(), etc
View gist:9e7ac7185ffd64c1a91a

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.

View gist:7aec03eb96a18dedee58

How to combine AWS Elastic Beanstalk, Docker and AWS CloudFormation


This text explains how to create and deploy a Docker-based AWS Elastic Beanstalk site and how to control it using CloudFormation.

Please find the CloudFormation template at the end of this Gist.

We assume that you are familiar with AWS ElasticBeanstalk, AWS CloudFormation and Docker.

tpope / cloud2butt.vim
Created Sep 18, 2014
Cloud to Butt dot Vim
View cloud2butt.vim
function! s:butt() abort
syn match cloud2butt "\<th\%(e cloud\>\)\@=" conceal cchar=m
syn match cloud2butt "\%(\<th\)\@<=e\%( cloud\>\)\@=" conceal cchar=y
syn match cloud2butt "\%(\<the \)\@<=c\%(loud\>\)\@=" conceal cchar=b
syn match cloud2butt "\%(\<the c\)\@<=l\%(oud\>\)\@=" conceal cchar=u
syn match cloud2butt "\%(\<the cl\)\@<=o\%(ud\>\)\@=" conceal cchar=t
syn match cloud2butt "\%(\<the clo\)\@<=ud\>" conceal cchar=t
sj26 / lenient_csv.rb
Last active Aug 29, 2015
Ruby CSV parser support RFC 4180 double double-quote and unix-style backslash escaping
View lenient_csv.rb
require "strscan"
class LenientCSV
def initialize(source)
@scanner =
def each
until @scanner.eos?
yield scan_row
cridenour / gist:74e7635275331d5afa6b
Last active Oct 17, 2021
Setting up Vim as your Go IDE
View gist:74e7635275331d5afa6b

Setting up Vim as your Go IDE

The final IDE


I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

lox /
Last active Feb 26, 2020
Uninstall VirtualBox from the command-line
set -e
version=$(VBoxManage --version)
base=$(echo ${version//r/-} | cut -d- -f1)
echo "downloading installer (for uninstall tool)"
if ! [ -f ~/Downloads/$filename ]; then
curl -C - -L -o ~/Downloads/$filename \