Skip to content

Instantly share code, notes, and snippets.

View rthbound's full-sized avatar

Ryan T. Hosford rthbound

View GitHub Profile
@rthbound
rthbound / BHMBlackOwnedBarsAndRestaurants.md
Last active August 18, 2021 18:01
Black Owned Bars and Restaurants in Birmingham
  • Safe Room Lounge
  • Cajun Bistro Express
  • Lob House Seafood and Steak
  • Post Office Pies
  • Teresa and Son
  • Top that Grille ll
  • SLEEKS sports bar
  • East of the Mississippi Diner
  • Pinspiration Birmingham
  • Alabama Sports and Daiquiri
@rthbound
rthbound / spiral_fantasy.rb
Created December 3, 2017 16:49
aoc-2017-p2.rb
class SpiralFantasy
def initialize(number)
@number = number.to_i
@grid = { Complex(0,0) => 1 }
end
def call
draw.values.max
end
@rthbound
rthbound / missing_images.csv
Last active February 5, 2017 00:14
unitedstates/images (missing)
name bioguide 450x550 225x275
James Comer C001108 1 1
Dwight Evans E000296 1 1
Catherine Cortez Masto C001113 1 1
Tom O'Halleran O000171 1 1
Andy Biggs B001302 1 1
Ro Khanna K000389 1 1
Jimmy Panetta P000613 1 1
Salud Carbajal C001112 1 1
Nanette Barragán B001300 1 1
@rthbound
rthbound / README.md
Created December 27, 2016 21:36 — forked from thbar/README.md
A quick benchmark for ice_cube

Quick benchmark to see how ice_cube behaves in the far future. It seems that the cost is linearly increasing.

Results at: http://bit.ly/pjsQH1

(note: second version is without the time parse in the loop)

@rthbound
rthbound / 9_to_5.rb
Created December 27, 2016 21:36 — forked from seejohnrun/9_to_5.rb
ice_cube 9-5
s = IceCube::Schedule.new(Time.now, :duration => 3600 * 7)
s.add_recurrence_rule IceCube::Rule.daily.day(:monday, :tuesday, :wednesday, :thursday, :friday).hour_of_day(9)
s.occurring_at?(Time.new(2011, 5, 30, 10, 0, 0)) # true, monday at 10am
s.occurring_at?(Time.new(2011, 5, 29, 10, 0, 0)) # false, sunday at 10am
s.occurring_at?(Time.new(2011, 5, 30, 8, 0, 0)) # false, monday at 8am
@rthbound
rthbound / rebase_onto_docs.md
Created December 9, 2016 20:39
git rebase --onto master develop feature/my-approved-feature
   Another example of --onto option is to rebase part of a branch. If we have the following situation:

                                   H---I---J topicB
                                  /
                         E---F---G  topicA
                        /
           A---B---C---D  master

   then the command
@rthbound
rthbound / 25068_reproduction_steps.rb
Created September 9, 2016 21:17
Reproduction steps for rails/rails #25068
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
for i in $(echo -n 10 9 8 7 6 5 4 3 2 1); do convert -delay 6 -loop 0 \
tpp_gif_intro_es.jpg tpp_gif_blank.jpg tpp_gif_${i}.jpg tpp_gif_blank.jpg tpp_gif_${i}text_es.jpg tpp_gif_blank.jpg tpp_gif_outro_es.jpg tpp_gif_intro_es.jpg -morph 2 \
\( -clone 0 -set delay 390 \) -swap 0,-1 +delete \
\( -clone 6 -set delay 240 \) -swap 6,-1 +delete \
\( -clone 12 -set delay 640 \) -swap 12,-1 +delete \
\( -clone 18 -set delay 640 \) -swap 18,-1 +delete \
+delete practice_animated_${i}_es.gif; done
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', path: "."
@rthbound
rthbound / eager_load_with_conditions_bug.rb
Last active February 23, 2016 21:38
Eager loading with conditions not working as expected, both with `#where` and with `#joins`
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'