Skip to content

Instantly share code, notes, and snippets.

View hugorodgerbrown's full-sized avatar

Hugo Rodger-Brown hugorodgerbrown

View GitHub Profile
@hugorodgerbrown
hugorodgerbrown / Brewfile
Created May 17, 2021 13:25
Brewfile to bootstrap a new mac
tap "heroku/brew"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "homebrew/services"
tap "mutagen-io/mutagen"
tap "zkokaja/brewlet"
brew "git"
brew "graphviz"
@hugorodgerbrown
hugorodgerbrown / Dockerfile
Created February 1, 2021 09:46 — forked from kjagiello/Dockerfile
An example Dockerfile showing how to build Facebook's watchman for your application (a life saver when running Django locally)
# Stage: watchman
# Build watchman as a separate stage in the build process, as we do not want
# all the build dependencies to end up in the final image.
FROM python:3.7 AS watchman
ARG WATCHMAN_VERSION=v4.9.0
ENV WATCHMAN_VERSION=${WATCHMAN_VERSION}
WORKDIR /tmp
@hugorodgerbrown
hugorodgerbrown / ssh-test-setup.md
Last active October 1, 2017 17:17
Simple setup to get an EC2 Ubuntu SFTP server set up
@hugorodgerbrown
hugorodgerbrown / keybase.md
Created September 13, 2017 13:24
Keybase proof

Keybase proof

I hereby claim:

  • I am hugorodgerbrown on github.
  • I am hrb (https://keybase.io/hrb) on keybase.
  • I have a public key ASA4RaG1OldI9iIlI7B9CV2cdzRhyesubIdsYvKn0rlmVAo

To claim this, I am signing this object:

@hugorodgerbrown
hugorodgerbrown / remove_tags.sh
Last active January 12, 2021 21:28
Git - remove all remote tags
# Sometimes tags get out of control - git apps (Tower, SourceTree, Github) can often add
# tags automatically (e.g. when merging branches) and over time your remote repo can become
# cluttered with irrelevant tags. The easiest way to clean this up is to get your local
# repo in order, delete all the remote repo tags, and then repush from local.
# Dump all local tags into a text file
git tag -l > tags.txt
# Remove all the tags you want to keep, leaving only those for deletion.
[vim | emacs | micro | sublime | ...] tags.txt
# Delete all the tags that are left
@hugorodgerbrown
hugorodgerbrown / md_to_rst.sh
Last active March 26, 2023 16:57
Shell script for converting a batch of *.md files into *.rst using pandoc.
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .md file
@hugorodgerbrown
hugorodgerbrown / bash shortcuts
Created January 24, 2013 12:11
Bash shortcut key combos.
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
@hugorodgerbrown
hugorodgerbrown / changelog.md
Last active September 7, 2016 10:57
Last 10 deployments to yunojuno.com, automatically generated on Wednesday, 07-Sep-2016

v1482, deployed on Tuesday, 06-Sep-2016

  • Add specificity to where the search results should be added
  • Fix test regression related to button markup change
  • Disable opbeat async for rqworkers in Procfile
  • changed copy on post-onboarding onboarding tasks
  • Add opbeat logging support to RQ jobs.
  • Paginate todos page backoffice.
  • fixed admin buttons on fl profile & cleared out DS templates
  • Remove old invite response email
@hugorodgerbrown
hugorodgerbrown / gist:4011735
Created November 4, 2012 12:41
Git pimping scripts
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# pretty, coloured, graph visualisation - taken from http://stackoverflow.com/a/9074343/45698
git config --global alias.lg1 "log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative"
# pretty, coloured, graph visualisation - taken from http://stackoverflow.com/a/9074343/45698
git config --global alias.lg2 "log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit"
# add alias to create simple changelog
# usage: git clog <commit_hash>..HEAD
@hugorodgerbrown
hugorodgerbrown / trello-comments.py
Created September 21, 2012 11:16
Fetch latest comments from a Trello board
import datetime
import requests
BOARD_ID = '505a39b96cd440be5a3ba732'
DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%fz'
# trello api bits - get your own - https://trello.com/1/appKey/generate
API_KEY = '0e62df80c39cd97ef936c405d83b0a23'
API_TOKEN = '45ba8a4f47f4f2290695890464380024ef6852b9fed96dc620dea343bee79ba2'