Skip to content

Instantly share code, notes, and snippets.

View richardbbrooks's full-sized avatar

Richard Brooks richardbbrooks

View GitHub Profile
@richardbbrooks
richardbbrooks / keybase.md
Created December 30, 2017 07:46
keybase.md

Keybase proof

I hereby claim:

  • I am richardbbrooks on github.
  • I am richard (https://keybase.io/richard) on keybase.
  • I have a public key ASA-mYOcu06zwFf8ptATDnzO7ume-nA0W9H6sW81ZwhnUwo

To claim this, I am signing this object:

{"header":{"session":"19fbe39ad55a7bf5170c7518427d8eed","serviceVersion":"20100903","prefetchEnabled":true},"result":{"Songs":[{"SongID":"14007188","Name":"Run (I'm a Natural Disaster)","SongNameID":"2861681","AlbumID":"1034300","AlbumName":"The Odd Couple","ArtistID":"1063","ArtistName":"Gnarls Barkley","AvgRating":"0","IsVerified":"0","CoverArtFilename":"1034300.jpg","Year":"2008","EstimateDuration":"4096","Popularity":"1509900007","TrackNum":"4","IsLowBitrateAvailable":"1","Flags":"0","Sort":0},{"SongID":"8669809","Name":"Lucifer 9 (interlude)","SongNameID":"3456334","AlbumID":"120338","AlbumName":"The Grey Album","ArtistID":"8488","ArtistName":"Danger Mouse","AvgRating":"0","IsVerified":"1","CoverArtFilename":"120338.jpg","Year":"2004","EstimateDuration":"112","Popularity":"1512000009","TrackNum":"11","IsLowBitrateAvailable":"1","Flags":"0","Sort":1},{"SongID":"7838651","Name":"El Chupa Nibre","SongNameID":"25715","AlbumID":"127328","AlbumName":"The Mouse & The Mask","ArtistID":"434927","ArtistName":"DANG

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) {
text-shadow: @string;
}
.box-shadow (@string) {
-webkit-box-shadow: @string;
-moz-box-shadow: @string;
box-shadow: @string;
}
.drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) {
-webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha);
@richardbbrooks
richardbbrooks / seleniumGSThreaded.py
Last active December 12, 2015 07:38
Run a Selenium test against three different webdrivers simultaneously.
import unittest
import multiprocessing
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
@richardbbrooks
richardbbrooks / id_rsa.pub
Created June 19, 2011 21:52
Eleanor's id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmccgAP7oKqEdeRtloIZEs2NSKSwzoMhFu797/+rEP14cLVx4hflOSY0j21n9SVPSRBzHPl8fi6qfr02qQET0iXaNpZG4HXHakvSTJtDO06HGjjn4hYimrNDqKUsXAVESnhRcw4h17vhbiH35p6+kSCxZN9/vvl/ici8G8VnThtO0XMWPgRXzVOEsj4S9KnvSwxCA3yqGY8U38uv+/ighvjgIO0sZPGupa5yKlpTO6XByXWxkhO8TaZLFWkoKJijpTgFHbdMYaRXxWRAQPslEXHYDFITFu01QlpJDNd/GcyhuGqFNwcmsGEPsAJbRwHOus/FB8mV10SAw573wStXbKQ== rich90usa@Eleanor.local
@richardbbrooks
richardbbrooks / .vimrc
Created June 19, 2011 21:49
Eleanor's .vimrc
if !exists("autocommands_loaded")
let autocommands_loaded = 1
autocmd BufRead,BufNewFile,FileReadPost *.py source ~/.vim/python
endif
" This beauty remembers where you were the last time you edited the file, and returns to the same position.
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
filetype on
filetype plugin on
@richardbbrooks
richardbbrooks / .bash_profile
Created June 19, 2011 21:48
Eleanor's .bash_profile
alias ll='ls -hl'
alias la='ls -hla'
export CLICOLOR=1;
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
RED="\[\033[0;31m\]"
LEGAL_AGE = 21
def dowegotobar(people):
bargroup = []
underage = []
for person in people:
if person['age'] >= LEGAL_AGE and person['drinks'] == True:
bargroup.append(person)
else: