Skip to content

Instantly share code, notes, and snippets.

View jboursiquot's full-sized avatar

Johnny Boursiquot jboursiquot

View GitHub Profile
@jboursiquot
jboursiquot / gist:4369840
Created December 24, 2012 16:20
Ruby.gitignore
*.gem
*.rbc
.bundle
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
@jboursiquot
jboursiquot / gist:4530041
Created January 14, 2013 13:23
Stringify activerecord errors
o.errors.full_messages.join(', ')
@jboursiquot
jboursiquot / gist:4551385
Last active December 11, 2015 05:19
libstc++5
http://mirror.pnl.gov/ubuntu//pool/universe/g/gcc-3.3/libstdc++5_3.3.6-20~lucid1_amd64.deb
deb http://mirror.pnl.gov/ubuntu/ lucid-backports main universe
@jboursiquot
jboursiquot / vim-remove-m-newlines
Created March 12, 2013 16:44
Remove ^M line endings using Vim
:%s/<Ctrl-V><Ctrl-M>//g
@jboursiquot
jboursiquot / stop-git-clrf-warnings
Created March 19, 2013 22:23
Turning on/off Git's CRLF warnings
git config --get core.safecrlf //outputs current setting
git config core.safecrlf [false|true] //turns it [on|off]
@jboursiquot
jboursiquot / mlk-a-time-to-break-silence-excerp
Last active December 15, 2015 19:19
Motivation to "do the work." An excerpt from MLK's A Time to Break Silence speech.
We are now faced with the fact, my friends, that tomorrow is now.
We are confronted with the fierce urgency of now.
In this unfolding connundrum of life and history, there is such a thing as being too late.
Procrastination is still the thief of time.
Life often leaves us bare, naked and dejected with a lost opportunity.
The tide in the affairs of men does not remain at flood--it ebbs.
We may cry out desperately for time to pause in her passage, but time is adamant to every plea and rushes on.
Over the bleached bones and jumbled residues of numerous civilizations are written the pathetic words, "Too late."
Martin Luther King
@jboursiquot
jboursiquot / macosx-clear-cache
Created April 18, 2013 19:46
Clears Mac OS X DNS cache
dscacheutil -flushcache
@jboursiquot
jboursiquot / Object.blank.rb
Created June 21, 2013 13:38
Monkey patch from activesupport 3.1.1 to get objects to respond to blank? method
unless Object.new.respond_to? :blank?
class Object
# An object is blank if it's false, empty, or a whitespace string.
# For example, "", " ", +nil+, [], and {} are all blank.
#
# This simplifies:
#
# if address.nil? || address.empty?
#
# ...to:
@jboursiquot
jboursiquot / zsh-rvm-ruby
Created June 29, 2013 23:07
Ensure rvm sets the ruby version in use in new zsh terminal windows
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
require "rubygems"
require "awesome_print"
Pry.print = proc { |output, value| output.puts value.ai }