Skip to content

Instantly share code, notes, and snippets.

Chris Bielinski chrisb

Block or report user

Report or block chrisb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View gist:6afee349a56a7d60fb59
class MyController < ApplicationController
helper_method :do_something
# ...
def do_something
# ...
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active Oct 30, 2018
Homebrew, Ruby, and Rails on OS X 10.10
View gist:4d6a09c6cc1ca2e1b14e

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at:

2. Install the Command Line Tools (CLT)

View fizzbuzz.rb
(1..100).each { |i|s='';s+='Fizz'if i%3==0;s+='Buzz'if i%5==0;puts s==''?i:s }
View gist:6025458
all_hypos = [
[ "have perpetual cheese-breath", "sweat chocolate" ],
[ "be forced to eat blood for one year", "eat bugs for the rest of your life" ],
[ "always smell of poop", "look like a reptile" ]
View gist:5119612
require 'rubygems'
require 'active_support/all'
class MyEngine < Object
class Configuration
include ActiveSupport::Configurable
def self.method_missing(meth, *args)
self.config.send meth, *args
View gist:4583193
# untained_csv_each('my.csv'),'Date') do |row|
# # do something with row
# end
def untainted_csv_each(file,line_match,&block)
tmp_file ="-tmp","w+")
garbage_passed = false
file.each do |line|
garbage_passed = true if line =~ /^"(.*)#{line_match}"/ && !garbage_passed
View gist:4172555
function wysiwymTslt(strKey) {
var locale = $('html').attr('lang');
return {
'bold': { en: 'Bold', fr: '' },
'italic': { en: 'Italic', fr: '' },
'italics': { en: 'italics', fr: '' },
'link': { en: 'Link', fr: '' },
'blockquote': { en: 'Blockquote', fr: '' },
'large_code_block': { en: 'Large Code Block', fr: '' },
'quote': { en: 'Quote', fr: '' },
View gist:3960866

the Sun

"first is fleet of foot/ the second believes in love/ the third is blue and the fourth is red/ when looked on from above/ the fifth is King presiding/ the sixth and seventh his fathers/ the eighth his crowned brother/ circling with the others/ who do they worship?"

the law

"it cannot be held / but it can be broken / its eyes are everywhere / no one is above it / but not everyone is behind it / ..."


"riddle me this: / what is it that you can hold and keep, / but disappears as soon as you / pass it to another?"


View gist:3668627
class Foo
def hello
def bar
You can’t perform that action at this time.