Skip to content

Instantly share code, notes, and snippets.

Avatar
☀️
😎

Simeon Willbanks simeonwillbanks

☀️
😎
View GitHub Profile
View README.md

MyGem Build Status

It's a neat little gem that you're gunna love

Have trouble being happy while you're coding Ruby? You've come to the right place. This gem makes it dirt easy.

@simeonwillbanks
simeonwillbanks / .vimrc
Created Jan 10, 2014 — forked from robmiller/.vimrc
#writing #TechWordsToAvoid #vim
View .vimrc
highlight TechWordsToAvoid ctermbg=red ctermfg=white
autocmd FileType markdown match TechWordsToAvoid /\c\<\(obviously\|basically\|simply\|of\scourse\|clearly\|just\|everyone\sknows\|however\|so,\|easy\)\>/
autocmd BufWinEnter *.md match TechWordsToAvoid /\c\<\(obviously\|basically\|simply\|of\scourse\|clearly\|just\|everyone\sknows\|however\|so,\|easy\)\>/
autocmd InsertEnter *.md match TechWordsToAvoid /\c\<\(obviously\|basically\|simply\|of\scourse\|clearly\|just\|everyone\sknows\|however\|so,\|easy\)\>/
autocmd InsertLeave *.md match TechWordsToAvoid /\c\<\(obviously\|basically\|simply\|of\scourse\|clearly\|just\|everyone\sknows\|however\|so,\|easy\)\>/
autocmd BufWinLeave *.md call clearmatches()
View hash_inverse.rb
require './hash_inverse'
describe Hash do
describe "when empty and asked for the inverse" do
it "returns an empty hash" do
{}.inverse.must_equal Hash.new
end
end
describe "when mapping are unique and asked for the inverse" do
View authentication_macros.rb
# spec/support/macros/authentication_macros.rb
module AuthenticationMacros
def sign_in_user
let(:current_user) { Factory.stub(:user) }
before do
sign_in current_user
warden.stub(:authenticate => current_user)
warden.stub(:authenticate! => current_user)
end
View crash_it.rb
# an attempt to identify the commit when hpricot 0.8.3 segfaults
# were introduced.
#
# To be able to use git bisect run, I used fork to run the test-case,
# as otherwise the running process is left in a zombie I don't wanna leave state.
#
# Put this in hpricot source folder (with the Rakefile), then run:
#
# $ git checkout master
# $ git bisect start HEAD 0.8.2
@simeonwillbanks
simeonwillbanks / setup-centos-server.markdown
Created Feb 1, 2013 — forked from weakish/README.md
setup #centos #server #sysadmin #debian
View setup-centos-server.markdown

CentOS server setup guide for people from debian

A basic server setup guide for people from debian to CentOS.

Software

yum is apt-get/aptitude on CentOS.

@simeonwillbanks
simeonwillbanks / rules.md
Last active Dec 11, 2015 — forked from henrik/rules.md
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/ #poodr #ruby #ood #rubyrogues
View rules.md
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done.

You can break these rules if you can talk your pair into agreeing with you.

@simeonwillbanks
simeonwillbanks / goroutines2.go
Created Jan 8, 2013 — forked from elimisteve/goroutines2.go
Programming Challenge: Launch 4 threads, goroutines, coroutines, or whatever your language uses for concurrency, in addition to the main thread. In the first 3, add numbers together (see sample code below) and pass the results to the 4th thread. That 4th thread should receive the 3 results, add the numbers together, format the results as a strin…
View goroutines2.go
// Steve Phillips / elimisteve
// 2013.01.03
package main
import "fmt"
// intDoubler doubles the given int, then sends it through the given channel
func intDoubler(ch chan int, n int) {
ch <- n*2
View github-delete-all-notifications.user.js
// ==UserScript==
// @name GitHub delete all notifications button
// @namespace http://www.github.com/micolous/delete-all-notifications
// @description Adds a button to allow you to delete all notifications on a page.
// @include http://github.com/inbox/notifications*
// @include https://github.com/inbox/notifications*
// ==/UserScript==
/*
@simeonwillbanks
simeonwillbanks / MacVim-Janus.md
Created Oct 12, 2011 — forked from jraines/MacVim-Janus.md
Readme: Macvim & Janus #readme
View MacVim-Janus.md

##Intro

Janus is a "basic distribution of vim plugins and tools intended to be run on top of the latest MacVIM snapshot." It is maintained by Yehuda Katz and Carl Lerche.

I recently whinged on Twitter that all I really want is vim with TextMate's Command-T go-to-file functionality and some efficient visual tab/buffer navigation. Turns out MacVim + Janus, with just a few tweaks, is all that and more.

Installing Janus

Follow the installation instructions on the git page