Skip to content

Instantly share code, notes, and snippets.

Brad Huber daybreaker

Block or report user

Report or block daybreaker

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
daybreaker / dlemoji.rb
Last active Sep 27, 2019
Download and Zip your slack emoji
View dlemoji.rb
# gem install slack-ruby-client rubyzip
# run with: ruby dlemoji.rb
require 'rubygems'
require 'zip'
require 'slack-ruby-client'
require 'open-uri'
token = 'your stripe api token'
directory = '/<absolute/path/to>/emoji/' # The emoji directory must exist, and be empty.

Keybase proof

I hereby claim:

  • I am daybreaker on github.
  • I am daybreaker ( on keybase.
  • I have a public key ASCEUAt6wF2hH23KgNdKGvj_z3awkseJV7L4ScLJDwXTGQo

To claim this, I am signing this object:

daybreaker / reactions.rb
Created May 23, 2018
Ruby script to check slack reaction counts
View reactions.rb
require 'slack-ruby-client'
require 'date'
Slack.configure do |config|
config.token = token
client =
View reaction_count.rb
require 'slack-ruby-client'
require 'byebug'
require 'date'
def count_words(string)
words = string.split(' ')
frequency =
words.each { |word| frequency[word.downcase] += 1 }
View gist:de834476c6d398da46610240e0cc2b06
490 -- +1
125 -- 100
120 -- eyes
105 -- clapping
101 -- nice
98 -- ditto
80 -- joy
69 -- heart
67 -- white_check_mark
57 -- nugget
View gist:ab6dbbd8c124cc96bbe05023e3cac455
951 -- joy
746 -- clapping
493 -- heart
454 -- ditto
450 -- +1
387 -- 100
249 -- revelry
192 -- nice
190 -- tada
160 -- wave
View gist:5799336
{"title"=>"Radio Birdman - New Race", "url"=>"", "site"=>"", "date_found"=>"2013-04-16T00:00:00", "image_url"=>"", "id"=>"710c28f7f2c45e4f570412ee586cd412"},
{"title"=>"Radio Birdman - Aloha Steve & Danno", "url"=>"", "site"=>"", "date_found"=>"2013-04-16T00:00:00", "image_url"=>"", "id"=>"a0fe04216155c2450bf0016f11d8d34d"},
{"title"=>"RADIO BIRDMAN - DIE LIKE APRIL", "url"=>"", "site"=>"", "date_found"=>"2013-04-16T00:00:00", "image_url"=>"", "id"=>"1cc29d48cf5f5a46c779cdc048ef1cbb"},
{"title"=>"Radio Birdman - Man With Golden Helmet", "url"=>"
View gist:5617610
# model
class Survey < ActiveRecord::Base
CONDITIONS = ["surveys.hotel_id IS NOT NULL"]
# controller
conditions = Survey::CONDITIONS
unless params[:time_period].blank?
conditions << "surveys.created_at > '#{params[:time_period].to_i.months.ago}'"
daybreaker / gist:872706
Created Mar 16, 2011
Better array printing than var_dump
View gist:872706
View Modify Several PHP files
# Needed a script to loop through several php files modify any links, and insert some code into the header of each page.
# Since the header was standard on each page, it was easy enough to match, as were any links
# My question: How could I refactor this to be more efficient than using two different sub/gsubs, and a seperate file write?
Dir.glob('*.php') do |file_name|
#Find one instance of the header, and modify it
content =, "multiline\nreplacement")
#find every instance of <a href="blah.php"> and modify it to say <a href="blah.php?foo=bar">
You can’t perform that action at this time.