Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am roelbondoc on github.
  • I am roelbondoc (https://keybase.io/roelbondoc) on keybase.
  • I have a public key ASADQWyJ3D0n2UHibBW8KEEi5w-Cl0rzQnjnlj1e8wUAGQo

To claim this, I am signing this object:

require 'test_helper'
class UrlShortenerTest < ActionDispatch::IntegrationTest
test 'it shortens URLs' do
original = 'http://en.wikipedia.org/wiki/Sports_game'
post '/', url: original
assert_response 201
shortened = response.headers['Location']
assert shortened.length < original.length, 'URL is actually shorter'
describe 'sponsored pushes' do
let(:league) { create(:soccer_league) }
let(:job_data) do
{
tube: @tube_name,
message: @message,
article_uri: @article_uri,
category: @category,
league: league
primary_tag_uris: @primary_tag_uris,
@roelbondoc
roelbondoc / score_sc2_squad.md
Created September 13, 2011 21:07 — forked from talhasyed/score_sc2_squad.md
Score SC2 Squad

Talha

  • username: tlithralas
  • name: Talha Syed
  • character code: 190

Nate

  • username: Buddy
  • name: Nate Smith
@roelbondoc
roelbondoc / gist:1114639
Created July 29, 2011 20:19
bashrc ps1 setup
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
parse_rvm() {
rvm list 2> /dev/null | grep '=>' | sed -e 's/.*\s\(ruby\S*\).*/ (\1)/'
}
parse_gemset() {
rvm gemset list 2> /dev/null | grep '=>' | sed -e 's/=>\s*\(\w*\)/ (\1)/g'
}
PS1="\w\e[0;32m\$(parse_git_branch)\e[m\e[0;31m\$(parse_rvm)\e[m\e[0;34m\$(parse_gemset)\e[m\n$ "
@roelbondoc
roelbondoc / .vimrc
Created July 6, 2011 14:20
roelbondoc's vimrc
set nocompatible " use vim defaults
set et
set sw=2
set ts=2
set smarttab
set scrolloff=3 " keep 3 lines when scrolling
set cindent " cindent
set smartindent " smart indent
set autoindent " always set autoindenting on
set showcmd " display incomplete commands
@roelbondoc
roelbondoc / .bashrc
Created July 6, 2011 14:19
roelbondoc's bashrc
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
" File: findfiles.vim
" Author: Piotr Husiatyński <phusiatynski@gmail.com>
" Version: 1.01
" Licence: MIT Licence
let s:max_buff_height = 30
function! Find(args)
set nocompatible " use vim defaults
set et
set sw=2
set ts=2
set smarttab
set scrolloff=3 " keep 3 lines when scrolling
set cindent " cindent
set smartindent " smart indent
set autoindent " always set autoindenting on
set showcmd " display incomplete commands