Skip to content

Instantly share code, notes, and snippets.

View johnweldon's full-sized avatar

John Weldon johnweldon

View GitHub Profile
#!/bin/bash
read -r -d '' AWK <<EOF
{
date=\$1;
refname=\$2;
subject=substr(\$3,1,72);
sha=\$4;
len=split(refname, ref, "/");
@johnweldon
johnweldon / debug.go
Created April 26, 2016 02:54
Useful http debugging file. Replaces http.DefaultTransport with a logger of all http traffic.
package main
import (
"fmt"
"io"
"net/http"
"net/http/httputil"
"os"
)
@ammgws
ammgws / unifi_ubuntu_lxc_install.md
Last active January 23, 2019 11:15
Steps to install Unifi 5.6.29 in a Ubuntu 16.04 unpriveleged LXC

How to Get Rich (without getting lucky):

Seek wealth, not money or status. Wealth is having assets that earn while you sleep. Money is how we transfer time and wealth. Status is your place in the social hierarchy.

Understand that ethical wealth creation is possible. If you secretly despise wealth, it will elude you.

Ignore people playing status games. They gain status by attacking people playing wealth creation games.

You’re not going to get rich renting out your time. You must own equity - a piece of a business - to gain your financial freedom.

@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active April 10, 2024 11:02
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@aricart
aricart / README.md
Last active April 15, 2024 14:26
Sharing Jetstream

JetStream Stream Sharing

This is an incremental tutorial on how to share JetStream assets between accounts. The options are not going to be fully explained unless they are vital. The tools used are nats cli and nsc, and both have excellent --help.

Note that this tutorial is expected to be followed in sequence.

Prerequisites

  • Understand imports and exports and JWT