Skip to content

Instantly share code, notes, and snippets.

View richbs's full-sized avatar

Richard Barrett-Small richbs

View GitHub Profile
@richbs
richbs / Brewfile
Last active April 28, 2024 16:34
brew bundle dump
brew "ack"
brew "archey"
brew "bash"
brew "bash-completion"
brew "cask"
brew "colordiff"
brew "django-completion"
brew "emacs"
brew "fb303"
brew "fbthrift"
sudo apt-get install aptitude build-essential compizconfig-settings-manager curl dkms dselect gconf-editor terminator vim xclip
@richbs
richbs / .bash_profile
Created July 1, 2015 08:54
Work Mac .bash_profile
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=erasedups:ignorespace
HISTTIMEFORMAT="%H:%M "
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
my_integer = 2
my_float = 3.6
my_result= my_integer * my_float
#print my_result
my_string = "Hello World"
my_string = my_string + "\n"
#print my_string
hundred=100
#print my_string * hundred
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@richbs
richbs / date.js
Last active August 29, 2015 14:00
date.js
// PARSE THE URL
var QueryString = function () {
// This function is anonymous, is executed immediately and
// the return value is assigned to QueryString!
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
// If first entry with this name
import PIL
import PIL.JpegImagePlugin
from PIL import Image
from PIL import ImageChops
from collections import namedtuple
from Counter import Counter
from operator import itemgetter, mul, attrgetter
from colormath.color_objects import RGBColor
import colorsys
import csv
from github2.client import Github
# api settings for github
git_username = 'your_git_username'
git_api_token = 'your_git_api_token'
git_repo = 'username/repo_name'
# import all issues as this story type
pivotal_story_type = 'Bug'
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
@richbs
richbs / constable.xml
Created June 11, 2012 16:59
Typical Object Record from V&A Export
<mus_catalogue>
<rectype>mus_catalogue</rectype>
<sys_id>O81405</sys_id>
<mus_obj_images_field_data>
<_>2006BK5699</_>
<_>2010EG9864</_>
<_>2010EG9861</_>
<_>2010EG9860</_>
<_>2010EG9859</_>
<_>2010EE8765</_>