Skip to content

Instantly share code, notes, and snippets.

@bds
bds / rules for good testing.md
Created April 11, 2018 20:06 — forked from Integralist/rules for good testing.md
Sandi Metz advice for writing tests

Rules for good testing

Look at the following image...

...it shows an object being tested.

You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.

@bds
bds / pip.md
Created February 21, 2018 03:22 — forked from saurabhshri/pip.md
Install and use pip in a local directory without root/sudo access.

#Install and use pip in a local directory without root/sudo access. #####By: @saurabhshri

##Why? Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

##How?

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@bds
bds / codepoint.rb
Last active March 10, 2017 23:55
Ruby codepoints
puts ("2070".."2090").map {|i| [i.hex].pack("U"); }

Keybase proof

I hereby claim:

  • I am bds on github.
  • I am bds (https://keybase.io/bds) on keybase.
  • I have a public key ASB4Evif_EDD-524nYlYchAx214Pa2eHhrGmrq7u7Lt8sgo

To claim this, I am signing this object:

@bds
bds / gist:3a92e6c0e2aa3ea60c24
Created March 24, 2016 22:25
ngrep examples
sudo ngrep -q -T -W byline host api.zuora.com
sudo ngrep -q -T -W byline port 27017
@bds
bds / tmux-colors.sh
Last active March 11, 2016 22:01
Print Tmux colors
#!/usr/bin/env bash
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done
@bds
bds / .vimrc
Created November 14, 2015 20:54
.vimrc
set nocompatible " We are using Vim
syntax on
" * PLUGINS
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
@bds
bds / .bashrc
Last active January 14, 2021 19:12
dotfiles
# Cult of Vi
set -o vi
export VISUAL=vim
export EDITOR="$VISUAL"
# Colors!
alias ls='ls -G'
# History
export HISTFILE=~/.bash_history
@bds
bds / .vimrc
Created August 6, 2015 22:08
Minimal .vimrc
set nocompatible " We are using Vim
syntax on
set colorcolumn=80
set ruler
hi StatusLine ctermfg=0 ctermbg=3 cterm=bold " Window highlighting
hi StatusLineNC ctermfg=white ctermbg=4 cterm=none
hi Folded ctermfg=244 ctermbg=0 cterm=none " Code folding highlight