Skip to content

Instantly share code, notes, and snippets.


Brandon Keepers bkeepers

View GitHub Profile
View gist:1885
def slow_each(options, &block)
0.step(count(options), options[:limit]) do |offset|
find(:all, options.merge(:offset => offset)).each(&block)

Keybase proof

I hereby claim:

  • I am bkeepers on github.
  • I am bkeepers ( on keybase.
  • I have a public key whose fingerprint is 8AF6 4385 E45B 03AA 72D7 DE72 F524 D391 D545 3EF9

To claim this, I am signing this object:

bkeepers / twitnoise
Created Jun 3, 2014
Signal & Noise lists on Twitter
View twitnoise
# This script encapsulates my process for keeping up with Twitter:
# 1. Create a private list called Signal, add everyone you currently follow to
# it, and begin curating it.
# 2. Follow everyone you meet or find interesting.
# 3. Create a private list called Noise, containing everyone you follow that are
# not in Signal.
# 4. Use Signal as your timeline in tweetbot. Switch to Noise when you are bored
bkeepers / dabblet.css
Created Sep 15, 2014
The first commented line is your dabblet’s title
View dabblet.css
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;

Issue and Pull Request Age

bkeepers / modelines.rb
Last active Aug 29, 2015
Regular expression for vim and emacs modelines.
View modelines.rb
(-\*- \s* (?:mode:)? \s*) | # $1: Emacs
(\/\* \s* vim: \s* set \s* (?:ft|filetype)=) # $2: Vim
(\w+) # $3: language
(?(1) # If $1 matched...
;?\s* -\*- | # then close Emacs syntax
: \s* \*\/ # otherwise close Vim syntax
View gist:3157
def test_invalidate_tree
r1 = Category.create
r2 = Category.create
r3 = Category.create
r4 = Category.create
nodes = [r1, r2, r3, r4]
assert Category.valid?
View gist:055a148eb742fb9df736
>> require 'org-ruby'
>> puts'/tmp/')).to_html
<li>Item 1</li>
<li>Item 2
<pre class="example">