Skip to content

Instantly share code, notes, and snippets.

Nick Glynn 17twenty

Block or report user

Report or block 17twenty

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
@17twenty
17twenty / simple_git.md
Created Sep 27, 2013
A Simple Git branching model
View simple_git.md

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

@17twenty
17twenty / .bash_profile
Last active May 20, 2019
Mac bash profile to add Git, nice prompt and ls colours, bash completion (requires brew install bash-completion)
View .bash_profile
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
@17twenty
17twenty / Makefile
Created Aug 22, 2013
Simple Misc Driver Example
View Makefile
# Simple Makefile to build a simple misc driver
# Nick Glynn <Nick.Glynn@feabhas.com>
#
obj-m += misc_example.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
CC := $(CROSS_COMPILE)gcc
@17twenty
17twenty / xForwardTest.go
Created Jan 18, 2017
Extracting X-Forwarded-For from connections in Golang
View xForwardTest.go
package main
import (
"fmt"
"log"
"net/http"
"strings"
)
func main() {
@17twenty
17twenty / gist:2fb30a22141d84e52446
Created Feb 22, 2016
POST with NewRequest using Golang
View gist:2fb30a22141d84e52446
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
)
@17twenty
17twenty / gist:6925066
Last active Feb 2, 2019
Setting up your sdcard and u-boot's uEnv.txt for Beaglebone Black
View gist:6925066
# Find your micro SD card using lsblk - you're going to want to set your DISK parameter to it.
export DISK=/dev/mmcblk0
sudo dd if=/dev/zero of=${DISK} bs=1M count=16
sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__
1,48,0xE,*
,,,-
__EOF__
@17twenty
17twenty / docker-compose.yml
Created Sep 14, 2017
As a way to get Zookeeper / Kafka AND Kafka Manager working together in docker compose...
View docker-compose.yml
version: '2'
services:
zookeeper:
hostname: zookeeper
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
hostname: kafka
image: wurstmeister/kafka:0.9.0.0-1
@17twenty
17twenty / gist:2718613
Created May 17, 2012
Force Beaglebone to boot your settings on powerup from uEnv.txt
View gist:2718613
So the Beaglebone uses the file uEnv.txt to store settings as it doesn't have any NAND allocated to do it with, by
default the file is pretty empty save from the line:
optargs=run_hardware_tests quiet
You may have read a number of things about boot.scr etc - ignore it, it's not correct.
The bootcmd is hardwired in uboot to do the following (i've seperated it all out to make things clearer) - you can see it by
interrupting the bootsequence and performing a 'printenv'.
bootcmd=
@17twenty
17twenty / bash_profile
Last active Oct 3, 2018
My bash_profile for MacOS
View bash_profile
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
You can’t perform that action at this time.