Skip to content

Instantly share code, notes, and snippets.


Aaron Gibralter agibralter

Block or report user

Report or block agibralter

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
agibralter / inherited.rb
Last active Oct 4, 2018
Trying to figure out how to properly `include` an `inherited` hook
View inherited.rb
module Hook
def self.included(base)
# base.extend ClassMethods
base.class_eval do
# def self.inherited(baseclass)
# # super
# puts "1 #{baseclass.to_s}"

Keybase proof

I hereby claim:

  • I am agibralter on github.
  • I am agibralter ( on keybase.
  • I have a public key whose fingerprint is BA38 FE55 E22E 227E B70D DCE9 A847 216C 1298 BF13

To claim this, I am signing this object:

View gist:ff308f155177a13e6b5c
Verifying that +agibralter is my blockchain ID.
View gist:9328600
(╯°□°)╯︵┻━┻ WTF
┬─┬ノ(º_ºノ) CALM DOWN!
View gist:5638825
class GiantRobot
constructor: ->
@moves = []
smash: ->
crash: ->
View gist:5052964
html = $ JST["some_template"]
foo: bar
agibralter / gist:4744055
Last active Dec 12, 2015
split vs. index
View gist:4744055
require 'benchmark'
n = 100000
a = nil
b = nil
c = nil
STRING = "foo=bar;; path=/; expires=Sat, 09-Feb-2013 07:27:33 GMT; HttpOnly".freeze do |x|
agibralter / local_redis.rb
Last active Dec 11, 2015
Trying to get `ThinkingSphinx::Test.start_with_autostop` and Redis to stop when guard exits.
View local_redis.rb
# -*- encoding : utf-8 -*-
module LocalRedis
module ClassMethods
def run_in_foreground!
unless pid = fork
agibralter / guard.rb
Created Oct 18, 2012
Setup for `bundle exec guard` to work without compressed assets but `rake guard:jasmine` to compress assets.
View guard.rb
# Guardfile
# Spork
guard('spork', cucumber: false, test_unit: false, wait: 90) do
agibralter / random_attribute.rb
Created Sep 25, 2012
ActiveRecord random unique hash
View random_attribute.rb
module RandomAttribute
def generate_unique_random_base64(attribute, n)
until random_is_unique?(attribute)
self.send(:"#{attribute}=", random_base64(n))
def generate_unique_random_hex(attribute, n)
until random_is_unique?(attribute)
You can’t perform that action at this time.