Skip to content

Instantly share code, notes, and snippets.

@extrajordanary
Created June 1, 2017 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save extrajordanary/6eb1fbc11445ec72fe661dd5efa55737 to your computer and use it in GitHub Desktop.
Save extrajordanary/6eb1fbc11445ec72fe661dd5efa55737 to your computer and use it in GitHub Desktop.
sa_2017_help_queue_channels
Jordans-MacBook-Pro:www-makeschool jxa$ heroku run NEW_RELIC_AGENT_ENABLED=false rails c --sandbox
Running NEW_RELIC_AGENT_ENABLED=false rails c --sandbox on ⬢ www-makeschool... up, run.9056 (Standard-1X)
Running via Spring preloader in process 19
(0.5ms) BEGIN
Loading production environment in sandbox (Rails 4.2.8)
Any modifications you make will be rolled back on exit
irb(main):001:0> ActiveRecord::Base.logger.level = 1
=> 1
irb(main):002:0>
irb(main):003:0* def print_oa_slack_channels
irb(main):004:1> Academy::Cohort.all.each do |cohort|
irb(main):005:2* if cohort.display_subtitle.include?("2017")
irb(main):006:3> puts "\n#{cohort.display_title}: #{cohort.display_subtitle}"
irb(main):007:3>
irb(main):008:3* channel_name = SlackWrapper.slack_channel_for_oa_cohort(cohort)
irb(main):009:3> over_length = channel_name.length - 22
irb(main):010:3> over_string = over_length > 0 ? " (#{over_length})" : nil
irb(main):011:3>
irb(main):012:3* puts " #{channel_name}#{over_string}"
irb(main):013:3> end
irb(main):014:2> end
irb(main):015:1> end
=> :print_oa_slack_channels
irb(main):016:0>
irb(main):017:0* print_oa_slack_channels; nil
iOS Games: Atlanta | 2017
#q-atlanta-games
Fundamentals of Programming: Atlanta | 2017
#q-atlanta-fun
Fundamentals of Programming: Beijing | 2017
#q-beijing-fun
Fundamentals of Programming: Chicago | 2017
#q-chicago-fun
iOS Games: Chicago | 2017
#q-chicago-games
Fundamentals of Programming: Hong Kong | 2017
#q-hong-kong-fun
iOS Games: Los Angeles | 2017
#q-los-angeles-games
iOS Apps: Los Angeles | 2017
#q-los-angeles-apps
Fundamentals of Programming: Los Angeles | 2017
#q-los-angeles-fun
Fundamentals of Programming: Los Angeles | 2017
#q-los-angeles-fun
Fundamentals of Programming: New York City | 2017
#q-new-york-city-fun
iOS Apps: New York City | 2017
#q-new-york-city-apps
iOS Games: New York City | 2017
#q-new-york-city-games
Fundamentals of Programming: New York City | 2017
#q-new-york-city-fun
iOS Games: Oakland | 2017
#q-oakland-games
Fundamentals of Programming: Oakland | 2017
#q-oakland-fun
iOS Games: San Francisco | 2017
#q-san-fran-games
iOS Apps: San Francisco | 2017
#q-san-fran-apps
Two Year: San Francisco | 2017
#q-san-fran-pc
iOS Apps: San Francisco | 2017
#q-san-fran-apps
Fundamentals of Programming: San Francisco | 2017
#q-san-fran-fun
Fundamentals of Programming: San Francisco | 2017
#q-san-fran-fun
iOS Apps: Silicon Valley | 2017
#q-silicon-v-apps
iOS Games: Silicon Valley | 2017
#q-silicon-v-games
Fundamentals of Programming: Silicon Valley | 2017
#q-silicon-v-fun
Fundamentals of Programming: Silicon Valley | 2017
#q-silicon-v-fun
Fundamentals of Programming: Taichung | 2017
#q-taichung-fun
Fundamentals of Programming: Tokyo | 2017
#q-tokyo-fun
Fundamentals of Programming: Washington D.C. | 2017
#q-wash-dc-fun
iOS Games: Washington D.C. | 2017
#q-wash-dc-games
=> nil
irb(main):018:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment