├── lib ├── models │ ├── tip.rb │ ├── channel.rb │ ├── message.rb │ └── person.rb ├── api_lookups.rb └── user_nuker.rb ├── Procfile ├── update.sh ├── karma.rb ├── railsbot.rb ├── config ├── ops.yml ├── summer.yml ├── 8ball.yml └── reasons.yml ├── Gemfile ├── bin └── console ├── README.md ├── migration.rb ├── spec └── user_nuker_spec.rb ├── Gemfile.lock ├── bot.rb └── tips.sql /lib/models/tip.rb: -------------------------------------------------------------------------------- 1 | class Tip < ActiveRecord::Base 2 | 3 | end -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | bot: ruby bot.rb $RAILS_BOT_IRC_SERVER $RAILS_BOT_IRC_PORT -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | git pull 2 | bundle install 3 | ruby bot.rb irc.freenode.net 4 | -------------------------------------------------------------------------------- /lib/models/channel.rb: -------------------------------------------------------------------------------- 1 | class Channel < ActiveRecord::Base 2 | has_many :messages 3 | end -------------------------------------------------------------------------------- /karma.rb: -------------------------------------------------------------------------------- 1 | require 'railsbot' 2 | 3 | users = {} 4 | match = /(thank you)|thanks|\+1/ 5 | Message.find_in_batches(100).each do |chat| 6 | end -------------------------------------------------------------------------------- /lib/models/message.rb: -------------------------------------------------------------------------------- 1 | class Message < ActiveRecord::Base 2 | self.inheritance_column = nil 3 | belongs_to :person 4 | belongs_to :channel 5 | end 6 | -------------------------------------------------------------------------------- /lib/models/person.rb: -------------------------------------------------------------------------------- 1 | class Person < ActiveRecord::Base 2 | has_many :messages 3 | 4 | def self.find_insensitive(nick) 5 | self.where("lower(nick) = ?", nick.downcase).first 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /railsbot.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' # Suffer. 2 | require 'summer' 3 | require 'active_record' 4 | Dir["lib/models/**/*.rb"].each { |f| require f } 5 | $LOAD_PATH.unshift(File.dirname(__FILE__) + "/lib") 6 | -------------------------------------------------------------------------------- /config/ops.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - Radar 3 | - alindeman 4 | - spastorino 5 | - amerine 6 | - parndt 7 | - workmad3 8 | - sevenseacat 9 | - smathy 10 | - mikecmpbll 11 | - tubbo 12 | - bricker 13 | - baweaver 14 | - matthewd 15 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'http://rubygems.org' 2 | 3 | gem 'pg' 4 | 5 | gem "activesupport", "~> 5.2" 6 | gem "activerecord", "~> 5.2" 7 | gem "summer", github: 'radar/summer', :branch => 'master' 8 | gem 'httparty' 9 | gem 'nokogiri' 10 | gem 'redis' 11 | 12 | group :development do 13 | gem 'pry' 14 | gem 'rspec' 15 | end 16 | -------------------------------------------------------------------------------- /config/summer.yml: -------------------------------------------------------------------------------- 1 | nick: helpa 2 | alternate_nick: helpa-bot 3 | channels: 4 | - "#logga" 5 | - "#rubyonrails" 6 | - "#railsbridge" 7 | - "#spree" 8 | - "#spree-dev" 9 | - "#Rubyonrails-offtopic" 10 | - "#ruby" 11 | - "#ruby-offtopic" 12 | - "#rubysherpas" 13 | - "#elixir-lang" 14 | owner: "radar" 15 | auto_rejoin: true 16 | database: 17 | adapter: postgresql 18 | database: railsbot 19 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'bundler/setup' 4 | require 'active_record' 5 | 6 | p Dir["../lib/models/**/*.rb"] 7 | 8 | Dir[File.dirname(__FILE__) + "/../lib/models/**/*.rb"].map { |f| File.expand_path(f) }.each { |f| require f } 9 | 10 | config = YAML::load_file("config/summer.yml") 11 | ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || config['database']) 12 | ActiveRecord::Base.logger = Logger.new(STDOUT) 13 | 14 | require 'pry' 15 | Pry.start 16 | -------------------------------------------------------------------------------- /config/8ball.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - It is certain. 3 | - It is decidedly so. 4 | - Without a doubt. 5 | - Yes – definitely. 6 | - You may rely on it. 7 | - As I see it, yes. 8 | - Most likely. 9 | - Outlook good. 10 | - Yes. 11 | - Signs point to yes. 12 | - Reply hazy, try again. 13 | - Ask again later. 14 | - Better not tell you now. 15 | - Cannot predict now. 16 | - Concentrate and ask again. 17 | - Don't count on it. 18 | - My reply is no. 19 | - My sources say no. 20 | - Outlook not so good. 21 | - Very doubtful. 22 | - Ask Radar. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Railsbot 2 | 3 | This is the channel bot ("helpa") for #rubyonrails. It is used so people don't have to type things over and over again. 4 | 5 | You can run the bot yourself with `ruby bot.rb irc.freenode.net`. 6 | 7 | # Heroku 8 | Configure your bot in `config/summer.yml` 9 | 10 | First set the required config vars 11 | 12 | `heroku config:set RAILS_BOT_IRC_SERVER=irc.freenode.net` 13 | 14 | `heroku config:set RAILS_BOT_IRC_PORT=6667` 15 | 16 | next run required database migrations 17 | 18 | `heroku run ruby migration.rb` 19 | 20 | next configure heroku to use a bot worker 21 | 22 | `heroku ps:scale bot=1` 23 | 24 | **Database settings** 25 | 26 | The database settings in summer.yml will automatically be overwritten by heroku's DATABASE_URL environment variable so that its an effortless setup to use heroku postgres. 27 | -------------------------------------------------------------------------------- /config/reasons.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - Nobody knows for certain. 3 | - Unknown. 4 | - Unknowable. 5 | - Because. 6 | - Why not? 7 | - The alignment of the planets caused that. 8 | - Quantum entanglement. 9 | - "Because #{deity} wills it" 10 | - Have you tried staring really, really hard at it? 11 | - Have you tried deleting it all and starting again? 12 | - Code has gained sentience. 13 | - Ambient temperature not at recommended levels. 14 | - Sun at incorrect angle. 15 | - Moon at incorrect angle. 16 | - Computer too far to the left. 17 | - Computer too far to the right. 18 | - Computer too high. 19 | - Computer too low. 20 | - Computer in unknown n-dimensional space. 21 | - 42. 22 | - Because I said so. 23 | - I read it on the Internet. 24 | - "It's on a need-to-know basis. You don't need to know" 25 | - "Because on R'lyeh, they don't accept American Express." 26 | -------------------------------------------------------------------------------- /migration.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | require 'rubygems' 3 | require 'bundler/setup' 4 | require 'benchmark' 5 | require 'active_support/core_ext/class/attribute_accessors' 6 | require 'active_record' 7 | require 'yaml' 8 | 9 | config = YAML::load_file("config/summer.yml") 10 | 11 | ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || config["database"]) 12 | 13 | ActiveRecord::Schema.define do 14 | create_table :channels, :force => true do |t| 15 | t.string :name 16 | t.boolean :hidden, :default => false 17 | end 18 | 19 | create_table :constants, :force => true do |t| 20 | t.string :name, :url 21 | t.integer :api_id 22 | end 23 | 24 | add_index :constants, :api_id 25 | 26 | create_table :entries, :force => true do |t| 27 | t.string :name, :url 28 | t.integer :constant_id 29 | end 30 | 31 | add_index :entries, :constant_id 32 | 33 | create_table :messages, :force => true do |t| 34 | t.string :text 35 | t.string :type 36 | t.integer :channel_id 37 | t.integer :person_id 38 | t.boolean :hidden, :default => false 39 | t.timestamps :null => false 40 | end 41 | 42 | create_table :people, :force => true do |t| 43 | t.string :nick, :hostname 44 | t.boolean :authorized, :default => false 45 | end 46 | 47 | create_table :tips, :force => true do |t| 48 | t.string :command 49 | t.text :text 50 | end 51 | end 52 | 53 | Dir["lib/models/*.rb"].each { |f| require_relative f } 54 | -------------------------------------------------------------------------------- /lib/api_lookups.rb: -------------------------------------------------------------------------------- 1 | module ApiLookups 2 | THRESHOLD = 3 3 | def update_api_command(sender, reply_to, msg) 4 | return unless authorized?(sender[:nick]) 5 | privmsg("Updating API index", sender[:nick]) 6 | Lookup.update! 7 | privmsg("Updated API index! Use the !lookup or !lookup to find what you're after", sender[:nick]) 8 | end 9 | 10 | def lookup_command(sender, reply_to, msg, opts={}) 11 | parts = msg.split(" ")[0..-1].map { |a| a.split("#") }.flatten! 12 | results=Lookup.search(msg) 13 | opts.merge!(:reply_to => reply_to) 14 | show_api_results(results, msg, opts) 15 | end 16 | 17 | def show_api_results(results, search_string, opts={}) 18 | if results.empty? 19 | privmsg("I could find no API results matching `#{search_string}`.", opts[:reply_to]) 20 | elsif results.size == 1 21 | display_api_url(results.first, opts) 22 | elsif results.size <= THRESHOLD 23 | results.each_with_index do |result, i| 24 | display_api_url(result, opts.merge(:number => i+1)) 25 | end 26 | else 27 | privmsg("Please be more specific, we found #{results.size} results (threshold is #{THRESHOLD}).", opts[:reply_to]) 28 | end 29 | end 30 | 31 | def display_api_url(result, opts={}) 32 | s = opts[:number] ? opts[:number].to_s + ". " : "" 33 | # if we're a method then show the constant in parans 34 | s += "(#{result.constant.name}) " if result.is_a?(Lookup::Entry) 35 | s += "#{result.name} #{result.url}" 36 | privmsg("#{opts[:directed_at] ? opts[:directed_at] + ":" : ''} #{s}", opts[:reply_to]) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /spec/user_nuker_spec.rb: -------------------------------------------------------------------------------- 1 | require 'pry' 2 | require 'user_nuker' 3 | 4 | describe UserNuker do 5 | it "sreggin is bad" do 6 | result = UserNuker.new("sreggin").is_bad? 7 | expect(result).to eq(1) 8 | end 9 | 10 | it "DikshitNijjer is bad" do 11 | result = UserNuker.new("DikshitNijjer").is_bad? 12 | expect(result).to eq(2) 13 | end 14 | 15 | it "NightyMiggers is bad" do 16 | result = UserNuker.new("NightyMiggers").is_bad? 17 | expect(result).to eq(1) 18 | end 19 | 20 | it "radar is not bad" do 21 | result = UserNuker.new("radar").is_bad? 22 | expect(result).to eq(0) 23 | end 24 | 25 | it "pen is not bad" do 26 | result = UserNuker.new("pen").is_bad? 27 | expect(result).to eq(0) 28 | end 29 | 30 | it "n008f4g is not bad" do 31 | result = UserNuker.new("n008f4g").is_bad? 32 | expect(result).to eq(0) 33 | end 34 | 35 | it "mlkkk is not bad" do 36 | result = UserNuker.new("mlkkk").is_bad? 37 | expect(result).to eq(0) 38 | end 39 | 40 | it "d_ is not bad" do 41 | result = UserNuker.new("d_").is_bad? 42 | expect(result).to eq(0) 43 | end 44 | 45 | it "karapetyan is not bad" do 46 | result = UserNuker.new("karapetyan").is_bad? 47 | expect(result).to eq(0) 48 | end 49 | 50 | it "karape* is not bad" do 51 | result = UserNuker.new("karape___").is_bad? 52 | expect(result).to eq(0) 53 | end 54 | 55 | it "ignazioc is not bad" do 56 | result = UserNuker.new("ignazioc").is_bad? 57 | expect(result).to eq(0) 58 | end 59 | 60 | it "paulgafton is not bad" do 61 | result = UserNuker.new("paulgafton").is_bad? 62 | expect(result).to eq(0) 63 | end 64 | 65 | it "wolakkk is not bad" do 66 | result = UserNuker.new("wolakkk").is_bad? 67 | expect(result).to eq(0) 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: git://github.com/radar/summer.git 3 | revision: 7c08c6a8b2e986030db3718ca71daf2ca8dd668d 4 | branch: master 5 | specs: 6 | summer (1.0.0) 7 | activesupport (>= 3) 8 | 9 | GEM 10 | remote: http://rubygems.org/ 11 | specs: 12 | activemodel (5.2.1) 13 | activesupport (= 5.2.1) 14 | activerecord (5.2.1) 15 | activemodel (= 5.2.1) 16 | activesupport (= 5.2.1) 17 | arel (>= 9.0) 18 | activesupport (5.2.1) 19 | concurrent-ruby (~> 1.0, >= 1.0.2) 20 | i18n (>= 0.7, < 2) 21 | minitest (~> 5.1) 22 | tzinfo (~> 1.1) 23 | arel (9.0.0) 24 | coderay (1.1.2) 25 | concurrent-ruby (1.0.5) 26 | diff-lcs (1.3) 27 | httparty (0.16.2) 28 | multi_xml (>= 0.5.2) 29 | i18n (1.1.1) 30 | concurrent-ruby (~> 1.0) 31 | method_source (0.9.0) 32 | mini_portile2 (2.3.0) 33 | minitest (5.11.3) 34 | multi_xml (0.6.0) 35 | nokogiri (1.8.5) 36 | mini_portile2 (~> 2.3.0) 37 | pg (1.1.3) 38 | pry (0.11.3) 39 | coderay (~> 1.1.0) 40 | method_source (~> 0.9.0) 41 | redis (4.0.2) 42 | rspec (3.8.0) 43 | rspec-core (~> 3.8.0) 44 | rspec-expectations (~> 3.8.0) 45 | rspec-mocks (~> 3.8.0) 46 | rspec-core (3.8.0) 47 | rspec-support (~> 3.8.0) 48 | rspec-expectations (3.8.2) 49 | diff-lcs (>= 1.2.0, < 2.0) 50 | rspec-support (~> 3.8.0) 51 | rspec-mocks (3.8.0) 52 | diff-lcs (>= 1.2.0, < 2.0) 53 | rspec-support (~> 3.8.0) 54 | rspec-support (3.8.0) 55 | thread_safe (0.3.6) 56 | tzinfo (1.2.5) 57 | thread_safe (~> 0.1) 58 | 59 | PLATFORMS 60 | ruby 61 | 62 | DEPENDENCIES 63 | activerecord (~> 5.2) 64 | activesupport (~> 5.2) 65 | httparty 66 | nokogiri 67 | pg 68 | pry 69 | redis 70 | rspec 71 | summer! 72 | 73 | BUNDLED WITH 74 | 1.16.5 75 | -------------------------------------------------------------------------------- /lib/user_nuker.rb: -------------------------------------------------------------------------------- 1 | class UserNuker 2 | attr_reader :name 3 | 4 | def initialize(name, wordlist = nil) 5 | @name = clean(name) 6 | @reverse_name = @name.reverse 7 | @wordlist = wordlist 8 | end 9 | 10 | # Checks to see if the username is in any way related to a naughty 11 | # word, including its reverse. 12 | # 13 | # @return [Integer] Count of hits 14 | def is_bad? 15 | return 0 if excluded? 16 | combinations.select do |c| 17 | @name.include?(c) || @reverse_name.include?(c) 18 | end.count 19 | end 20 | 21 | def excluded? 22 | [ 23 | "pen", 24 | "noobfag", 25 | "karape", 26 | "dudepare", 27 | "ignazioc", 28 | "mlkkk", 29 | "paulgafton", 30 | "wolakkk" 31 | ].detect do |n| 32 | name == n || /#{n}_?/.match(name) 33 | end 34 | end 35 | 36 | # Our naughty wordlist 37 | # 38 | # @return [Array[String]] 39 | def wordlist 40 | @wordlist ||= %w( 41 | fuck 42 | migger 43 | nigger 44 | nijjer 45 | bitch 46 | cunt 47 | fag 48 | faggot 49 | damn 50 | damnit 51 | shit 52 | shitt 53 | penis 54 | hitler 55 | nazi 56 | rape 57 | kkk 58 | ) 59 | end 60 | 61 | # Potential word endings to look for as well to get 62 | # a stronger match 63 | # 64 | # @return [Array[String]] 65 | def endings 66 | @endings ||= %w( 67 | ing 68 | er 69 | it 70 | ) 71 | end 72 | 73 | # Combinations of words with endings 74 | # 75 | # @return [Array[String]] 76 | def combinations 77 | @combinations ||= 78 | wordlist + wordlist.product(endings).flat_map(&:join) 79 | end 80 | 81 | # Take care of simple character substitution 82 | # 83 | # @return [Hash[String, String]] 84 | def leet_sub 85 | @leet_sub ||= { 86 | ?1 => ?i, 87 | ?2 => ?z, 88 | ?3 => ?e, 89 | ?4 => ?a, 90 | ?5 => ?s, 91 | ?6 => ?g, 92 | ?7 => ?t, 93 | ?8 => ?b, 94 | ?0 => ?o, 95 | ?@ => ?a, 96 | ?$ => ?s 97 | } 98 | end 99 | 100 | # Cleans a name of spaces and other unnecessary characters, 101 | # and translates to alphabetical characters 102 | # 103 | # @param name [String] Original name 104 | # 105 | # @return [String] cleaned variant of the name 106 | def clean(name) 107 | name.downcase.delete('_ ').chars.map { |c| 108 | leet_sub[c] || c 109 | }.join 110 | end 111 | end 112 | -------------------------------------------------------------------------------- /bot.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | $:.unshift(File.dirname(__FILE__)) 3 | require 'bundler/setup' 4 | require 'railsbot' 5 | require 'json' 6 | require 'httparty' 7 | require 'nokogiri' 8 | require 'redis' 9 | require 'date' 10 | require 'pg' 11 | 12 | require 'lib/user_nuker' 13 | 14 | if ENV['MIGRATE'] 15 | puts "------> Running migrations:" 16 | require 'migration' 17 | end 18 | 19 | class Bot < Summer::Connection 20 | 21 | BALL8_TIPS = YAML.load(File.read(File.join(File.dirname(__FILE__), 'config', '8ball.yml'))) 22 | REASON_TIPS = YAML.load(File.read(File.join(File.dirname(__FILE__), 'config', 'reasons.yml'))) 23 | OPS = YAML.load(File.read(File.join(File.dirname(__FILE__), 'config', 'ops.yml'))) 24 | 25 | CONFIG = YAML::load_file("config/summer.yml") 26 | def did_start_up 27 | ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || config['database']) 28 | privmsg("Bot started up at #{Time.now.strftime("%d %B %Y %H:%M")}", CONFIG['owner']) 29 | @pastebin_dumbass = {} 30 | @redis = Redis.new 31 | end 32 | 33 | def auth_command(*args) 34 | privmsg("identify #{config['nickserv_password']}", "nickserv") 35 | end 36 | 37 | def authorize_command(sender, reply_to, msg, opts={}) 38 | return unless authorized?(sender[:nick]) && sender[:nick].downcase == "radar" 39 | p = person(msg) 40 | p.authorized = true 41 | p.save! 42 | privmsg("#{msg} is now authorized to (ab)use me.", sender[:nick]) 43 | end 44 | 45 | def gitlog_command(sender, reply_to, msg, opts={}) 46 | return unless authorized?(sender[:nick]) 47 | privmsg(`git log -1`.split("\n").first, reply_to) 48 | end 49 | 50 | def tip_command(sender, reply_to, command, options={}) 51 | return unless authorized?(sender[:nick]) 52 | if tip = Tip.find_by_command(command.strip) 53 | tip.text.gsub!("{nick}", sender[:nick]) 54 | message = tip.text 55 | 56 | message.gsub!("{nick}", sender[:nick]) 57 | 58 | if options[:directed_at] 59 | if tip.text =~ /{target}/ 60 | message.gsub!("{target}", options[:directed_at]) 61 | else 62 | message = "#{options[:directed_at]}: #{message}" 63 | end 64 | end 65 | 66 | privmsg(message, reply_to) 67 | log({ :nick => config[:nick]}, reply_to, message) 68 | end 69 | end 70 | 71 | def seen_command(sender, reply_to, nick, opts={}) 72 | return unless authorized?(sender[:nick]) 73 | nick = opts[:directed_at] if nick.nil? || nick.empty? 74 | return if nick.nil? 75 | if sender[:nick].downcase == nick.downcase 76 | privmsg("Looked in a mirror recently? Oh? Poor mirror.", reply_to) 77 | else 78 | p = Person.find_by_nick(nick) 79 | if p 80 | last_chat = p.messages.joins(:channel). 81 | where("channels.hidden = ?", false). 82 | order("messages.created_at DESC"). 83 | first 84 | end 85 | 86 | if last_chat 87 | time = last_chat.created_at.strftime("%d %B %Y, %H:%M%p") 88 | privmsg("I last saw #{nick} on ##{last_chat.channel.name} at #{time} (UTC), they said #{last_chat.text.inspect}", reply_to) 89 | else 90 | privmsg("Who's #{nick}?", reply_to) 91 | end 92 | end 93 | end 94 | 95 | def since_command(sender, reply_to, nick, opts={}) 96 | return unless authorized?(sender[:nick]) 97 | nick = opts[:directed_at] if nick.nil? || nick.empty? 98 | 99 | p = Person.find_insensitive(nick) 100 | unless p 101 | privmsg("Who is #{nick}?", reply_to) 102 | return 103 | end 104 | 105 | if p.messages.exists? 106 | first_message_date = p.messages.order("id ASC").first.created_at.to_date 107 | first_log_date = Date.parse("2012-09-01") 108 | duration = (Date.today - first_message_date).to_i 109 | message = "I first saw #{nick} on #{first_message_date}. They've been around now for #{duration} days." 110 | if first_message_date == first_log_date 111 | message += " However, this was the first day I started logging, so they could've been around longer than that." 112 | end 113 | else 114 | message = "I know that name, but I don't know whenfrom. They haven't been around for quite a while." 115 | end 116 | 117 | privmsg(message, reply_to) 118 | end 119 | 120 | 121 | def whois_command(sender, reply_to, nick, opts={}) 122 | return unless authorized?(sender[:nick]) 123 | nick = opts[:directed_at] if nick.nil? || nick.empty? 124 | p = Person.where(:nick => nick).first 125 | if p 126 | privmsg("http://logs.ryanbigg.com/p/#{nick}", reply_to) 127 | else 128 | privmsg("Who is #{nick}?", reply_to) 129 | end 130 | end 131 | 132 | def gem_command(sender, reply_to, gem_name, opts={}) 133 | return unless authorized?(sender[:nick]) 134 | message = "http://www.rubygems.org/gems/#{gem_name}" 135 | direct_at(reply_to, message, opts[:directed_at]) 136 | end 137 | 138 | def gs_command(sender, reply_to, msg, opts={}) 139 | return unless authorized?(sender[:nick]) 140 | search("http://www.rubygems.org/search", sender, msg, reply_to, opts, 'search') 141 | end 142 | 143 | def join_command(sender, reply_to, msg, opts={}) 144 | join(msg) if authorized?(sender[:nick]) 145 | end 146 | 147 | def say_command(sender, reply_to, msg, opts={}) 148 | return unless authorized?(sender[:nick]) 149 | chan, msg = msg.split(" ", 2) 150 | begin 151 | privmsg(msg, chan) 152 | rescue 153 | # The channel is user-input, and if it's a non-existent channel can crash the bot. 154 | # Replying back to the attempt here instead if something goes wrong. 155 | privmsg("Sorry, could not say that", reply_to) 156 | end 157 | end 158 | 159 | def part_command(sender, reply_to, msg, opts={}) 160 | part(msg) if authorized?(sender[:nick]) 161 | end 162 | 163 | def google_command(sender, reply_to, msg, opts={}) 164 | search("http://www.google.com/search", sender, msg, reply_to, opts) 165 | end 166 | 167 | alias :g_command :google_command 168 | 169 | def gg_command(sender, reply_to, msg, opts={}) 170 | search("http://lmgtfy.com/", sender, msg, reply_to, opts) 171 | end 172 | 173 | def railscast_command(sender, reply_to, msg, opts={}) 174 | search("http://railscasts.com/episodes", sender, msg, reply_to, opts, "search") 175 | end 176 | 177 | def githubs_command(sender, reply_to, msg, opts={}) 178 | search("http://github.com/search", sender, msg, reply_to, opts) 179 | end 180 | 181 | def github_command(sender, reply_to, msg, opts={}) 182 | parts = msg.split(/\/| /) 183 | if parts.empty? 184 | message = "http://github.com - Social code hosting using Git" 185 | else 186 | message = "http://github.com/#{parts[0]}/" 187 | message += "#{parts[1]}/" if parts[1] 188 | message += "tree/#{parts[2]}" if parts[2] 189 | message += "/#{parts[3..-1].join("/")}" if !parts[3].nil? 190 | end 191 | direct_at(reply_to, message, opts[:directed_at]) 192 | end 193 | 194 | def ghstatus_command(sender, reply_to, msg, opts={}) 195 | response = HTTParty.get('https://status.github.com/api/last-message.json').parsed_response 196 | message = response["body"] + " (https://status.github.com/)" 197 | 198 | case response["status"] 199 | when "minor" 200 | privmsg("GitHub is currently experiencing MINOR PROBLEMS. #{message}", reply_to) 201 | when "major" 202 | privmsg("GitHub is currently experiencing MAJOR PROBLEMS. #{message}", reply_to) 203 | else 204 | privmsg("GitHub status: #{message}", reply_to) 205 | end 206 | end 207 | 208 | def railsapi_command(sender, reply_to, msg, opts={}) 209 | search("http://api.rubyonrails.org", sender, msg, reply_to, opts) 210 | end 211 | 212 | def rubyapi_command(sender, reply_to, msg, opts={}) 213 | search("http://ruby-doc.org/search.html", sender, msg, reply_to, opts) 214 | end 215 | 216 | def add_command(sender, channel, message, opts={}) 217 | return unless authorized?(sender[:nick]) 218 | message = message.split(" ") 219 | return if message.empty? 220 | Tip.find_by_command(message[0]) || Tip.create!(:command => message[0], :text => message[1..-1].join(" ")) 221 | privmsg("The !#{message[0]} command is now available.", channel == me ? sender[:nick] : channel) 222 | end 223 | 224 | def forget_command(sender, channel, message, opts={}) 225 | return unless authorized?(sender[:nick]) && sender[:nick].downcase == "radar" 226 | message = message.split(" ") 227 | Tip.find_by_command(message[0]).try(:destroy) 228 | privmsg("The !#{message[0]} command has been deleted.", channel == me ? sender[:nick] : channel) 229 | end 230 | 231 | def help_command(sender, channel, message, opts={}) 232 | privmsg("I need somebody! !help. Not just anybody. !help. You know I need someone. !help", channel == me ? sender[:nick] : channel) 233 | end 234 | 235 | define_method "8ball_command" do |sender, channel, message, opts={}| 236 | direct_at(channel, BALL8_TIPS[rand(BALL8_TIPS.size)], opts[:directed_at]) 237 | end 238 | 239 | define_method "reason_command" do |sender, channel, message, opts={}| 240 | direct_at(channel, REASON_TIPS[rand(REASON_TIPS.size)], opts[:directed_at]) 241 | end 242 | 243 | def when_command(sender, channel, message, opts={}) 244 | estimate = Time.now + rand(10000).days 245 | direct_at(channel, "Calculating estimated date from all known knowledge... Best estimate: #{estimate.to_date} (or there abouts).") 246 | end 247 | 248 | def where_command(sender, channel, message, opts={}) 249 | latitude = opts.fetch(:latitude, rand(-90.0000...90.0000)) 250 | longitude = opts.fetch(:longitude, rand(-180.0000...180.0000)) 251 | 252 | url = "https://www.google.com/maps/@#{latitude},#{longitude},7z" 253 | msg = "" 254 | msg += "#{opts[:directed_at]}: " if opts[:directed_at] 255 | msg += "Meet here: #{url}" 256 | 257 | direct_at(channel, msg) 258 | end 259 | 260 | def channel_message(sender, channel, message, options={}) 261 | # try to match a non-existent command which might be a tip 262 | spam_protection(sender, channel, message) 263 | naughty_word_detection(sender, channel, message) 264 | log(sender, channel, message) 265 | tip_me(sender, channel, message) 266 | pastebin_sucks(sender, channel, message) 267 | end 268 | 269 | alias_method :private_message, :channel_message 270 | 271 | def spam_protection(sender, channel, message) 272 | return if authorized?(sender[:nick]) 273 | key = "irc-#{sender[:nick]}" 274 | count = @redis.get(key) 275 | unless count 276 | @redis.set(key, 1) 277 | @redis.expire(key, 20) 278 | return 279 | end 280 | 281 | # Key has somehow got a TTL of -1. 282 | # I don't know how this happens. 283 | if @redis.ttl(key) == -1 284 | @redis.del(key) 285 | return 286 | end 287 | 288 | count = @redis.incr(key) 289 | if count >= 10 290 | notified_key = "notified-radar-about-#{sender[:nick]}" 291 | notified = @redis.get(notified_key) 292 | unless notified 293 | @redis.set(notified_key, 1) 294 | @redis.expire(notified_key, 300) 295 | message = "#{sender[:nick]} is spamming in #{channel}. They have been muted with extreme prejudice." 296 | privmsg("quiet #{channel} #{sender[:nick]}", "chanserv") 297 | channel = ruby_channel?(channel) ? "#ruby-ops" : "Radar" 298 | privmsg(message, channel) 299 | end 300 | end 301 | end 302 | 303 | def naughty_word_detection(sender, channel, message) 304 | bad_words = ["nigger"] 305 | bad_word = bad_words.detect { |word| message.include?(word) } 306 | if bad_word && !authorized?(sender[:nick]) 307 | privmsg("#{sender[:nick]} said #{bad_word} in #{channel}", "#ruby-ops") 308 | end 309 | end 310 | 311 | def count_command(sender, channel, message, opts={}) 312 | privmsg("I know of #{Tip.count} ways to entertain you.", channel) 313 | end 314 | 315 | # Important command for Aeyrix 316 | def mods_command(sender, channel, message, opts={}) 317 | return unless authorized?(sender[:nick]) 318 | privmsg("baweaver bricker mikecmpbll Necromancer Radar sevenseacat smathy workmad3", channel) 319 | end 320 | alias :ops_command :mods_command 321 | 322 | def mute_command(sender, channel, message, opts={}) 323 | if OPS.include?(sender[:nick]) 324 | message_parts = message.split 325 | privmsg("quiet #{channel} #{message_parts[0]}", "chanserv") 326 | end 327 | end 328 | 329 | def unmute_command(sender, channel, message, opts={}) 330 | if OPS.include?(sender[:nick]) 331 | message_parts = message.split 332 | privmsg("unquiet #{channel} #{message_parts[0]}", "chanserv") 333 | end 334 | end 335 | 336 | def ping_command(sender, channel, message, opts={}) 337 | privmsg("!pong", sender[:nick]) 338 | end 339 | 340 | def update_command(sender, channel, message, opts={}) 341 | return unless sender[:nick].downcase == "radar" 342 | privmsg("Updating!", sender[:nick]) 343 | quit("Be right back, just putting on a fresh face") 344 | exec "./update.sh" 345 | end 346 | 347 | def mode_event(sender, channel, *mode) 348 | log(sender, channel, mode.join(" "), "mode") 349 | end 350 | 351 | def kick_event(sender, channel, victim, message) 352 | # message contains channel name for whatever reason 353 | reason = message.split(" ")[1..-1].join(" ") 354 | log(sender, channel, "#{sender[:nick]} kicked #{victim}: #{reason}", "kick") 355 | end 356 | 357 | def join_event(joiner, channel) 358 | check_username(joiner, channel) 359 | check_for_anonymous_kiwiirc(joiner, channel) 360 | log(joiner, channel, "has joined #{channel}", "join") 361 | end 362 | 363 | def part_event(parter, channel, message) 364 | log(parter, channel, "has left #{channel}: (#{message})", "part") 365 | end 366 | 367 | def quit_event(quitter, message) 368 | # For some reason, this crashes helpa: 369 | # (Quit: http://quassel-irc.org - Bate-papo confortável em qualquer lugar.) 370 | log(quitter, "", message.force_encoding('utf-8'), "quit") 371 | end 372 | 373 | private 374 | 375 | def ruby_channel?(channel) 376 | ["#ruby", "#ruby-ops", "#ruby-offtopic", "#ruby-community", "#ruby-banned"].include?(channel) 377 | end 378 | 379 | def elixir_channel?(channel) 380 | ["#elixir-lang"].include?(channel) 381 | end 382 | 383 | def tip_me(sender, channel, message) 384 | return if ruby_channel?(channel) || elixir_channel?(channel) 385 | 386 | if m = /^(([^:]+)[:|,])?\s?!([^\s]+)\s?(.*)?/.match(message) 387 | cmd_sym = "#{m[3]}_command".to_sym 388 | # if we don't respond to this command then it's likely a tip 389 | if respond_to?(cmd_sym) 390 | if !m[2].nil? 391 | send(cmd_sym, sender, channel, m[4], { :directed_at => m[2] }) 392 | end 393 | else 394 | tip_command(sender,channel, m[3], { :directed_at => m[2] }) 395 | end 396 | end 397 | end 398 | 399 | def pastebin_sucks(sender, channel, message) 400 | if %w[#rubyonrails #ruby].include?(channel.downcase) 401 | if m = /http:\/\/.*?pastebin.com\/(?!raw)/i.match(message) 402 | dumbass = @pastebin_dumbass[sender[:nick]] 403 | if dumbass.nil? || dumbass < Time.now.to_i - 300 404 | privmsg("Hi #{sender[:nick]}. We in #{channel.downcase} would really appreciate it if you did not use pastebin during your time with us.", channel) 405 | privmsg("Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!", channel) 406 | else 407 | privmsg("Hi again #{sender[:nick]}. If you continue to use pastebin in #{channel.downcase}, much scorn will be heaped upon you. Please use Gist (http://gist.github.com or Pastie (http://pastie.org) instead. Thanks!", sender[:nick]) 408 | end 409 | @pastebin_dumbass[sender[:nick]] = Time.now.to_i 410 | end 411 | end 412 | end 413 | 414 | def log(sender, channel, message, type='message') 415 | name = channel.gsub("#", '') 416 | channel = Channel.where("NAME ILIKE ?", name).first 417 | channel = Channel.create!(:name => name, hidden: true) if channel.nil? 418 | person = person(sender[:nick]) 419 | channel.messages.create!(:person => person, 420 | :text => message, 421 | :type => type, 422 | :hidden => channel.hidden) 423 | end 424 | 425 | def direct_at(reply_to, message, who=nil) 426 | message = who + ": #{message}" if who 427 | privmsg(message, reply_to) 428 | end 429 | 430 | def search(host, sender, msg, reply_to, opts, query_parameter="q") 431 | message = "#{host}?#{query_parameter}=#{msg.split(" ").join("+")}" 432 | direct_at(reply_to, message, opts[:directed_at]) 433 | end 434 | 435 | def person(nick) 436 | person = Person.find_by("nick ILIKE ? ESCAPE ''", nick) 437 | person ||= Person.create(nick: nick) 438 | end 439 | 440 | # Who's there? 441 | 442 | def authorized?(nick) 443 | Person.where("nick ILIKE ? AND authorized = ?", nick, true).exists? 444 | end 445 | 446 | def check_username(user, channel) 447 | score = UserNuker.new(user[:nick]).is_bad? 448 | if score > 0 && ruby_channel?(channel) 449 | privmsg("#{user[:nick]} (#{user[:hostname]}) has joined #{channel} with a bad nick. Score: #{score}.", "#ruby-ops") 450 | end 451 | end 452 | 453 | def check_for_anonymous_kiwiirc(user, channel) 454 | if user[:hostname].include?("kiwiirc") && !Person.where("nick ILIKE ?", user[:nick]).exists? 455 | privmsg("Unknown KiwiIRC user detected: #{user[:nick]} (#{user[:hostname]}) has joined #{channel}.", "#ruby-ops") 456 | end 457 | end 458 | end 459 | 460 | 461 | Bot.new(ARGV[0], ARGV[1] || 6667) 462 | -------------------------------------------------------------------------------- /tips.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE tips ( 2 | id integer NOT NULL, 3 | command character varying(255), 4 | text text 5 | ); 6 | 7 | 8 | CREATE SEQUENCE tips_id_seq 9 | START WITH 1 10 | INCREMENT BY 1 11 | NO MAXVALUE 12 | NO MINVALUE 13 | CACHE 1; 14 | 15 | 16 | COPY tips (id, command, text) FROM stdin; 17 | 1 twonklist http://twonklist.com - A place to name and shame the less desirable people of the world. 18 | 2 finders http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg 19 | 3 routing http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy 20 | 4 associations http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy 21 | 5 rails-view-lookup http://stuff.lilleaas.net/how_rails_selects_which_view_to_render - Which conditions Rails uses in order to determine which view file to render when controller actions are invoked. 22 | 6 routing-overview http://frozenplague.net?p=108 - An introductory guide to RESTful Routing. 23 | 7 guides http://guides.rubyonrails.org/ - Ruby on Rails guides, part of the ongoing hackfest 24 | 8 botsnack Nom nom. Thanks, {nick}! 25 | 9 peepcode http://peepcode.com - Awesome screencasts of very high quality and relevance. The $9 is totally worth it. 26 | 10 railscasts http://railscasts.com - Great free screencasts by Ryan Bates. Tips, tricks and best practices. 27 | 11 lighthouse http://lighthouseapp.com -- beautiful simple issue tracking 28 | 12 fatmodel http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model - Place the logic where it's supposed to be placed 29 | 13 rails-lighthouse http://rails.lighthouseapp.com - Rails issue tracking 30 | 14 wwrd What would Radar do? 31 | 15 windows http://frozenplague.net/?page_id=175#windows 32 | 16 scaffold http://tpope.us/rubyonrailsfaq.html 33 | 17 passenger Passenger (mod_rails) is an Apache / nginx module for running Rails applications. It is fast, sexy and very easy to setup. http://www.modrails.com/. Other resources: Peepcode's setup guide: http://peepcode.com/products/phusion-passenger Railscasts: http://railscasts.com/episodes/122-passenger-in-development 34 | 18 webhosts Ruby on Rails hosting can be provided for by any (decent) webhost, for a list of webhosts (we won't normally recommend them) look here: http://wiki.rubyonrails.com/rails/pages/RailsWebHosts 35 | 19 php : PHP is Russia and Ruby on Rails is America 36 | 20 rubyonrails-talk http://groups.google.com/group/rubyonrails-talk 37 | 21 yourownblog http://nubyonrails.com/articles/about-this-blog-memcached - Every beginning Rails developer should write their own blog software. 38 | 22 vampire Help vampire detected by {nick}. Dispersing e-Garlic and wooden stakes. 39 | 23 select_all http://guides.rails.info/finders.html#_tt_select_all_tt 40 | 24 i18n http://guides.rubyonrails.org/i18n.html - Guide on i18n by Sven Fuchs and Karel Minařík 41 | 25 howtoaskforhelp http://frozenplague.net/?p=267 42 | 26 acl http://github.com/ezmobius/acl_system2 43 | 27 skitch http://skitch.com - Image sharing site with related application for Mac OS X 44 | 28 deploy-ubuntu Deploying on Ubuntu / Debian using Apache, Rails, Passenger and Capistrano: http://frozenplague.net/?p=230 45 | 29 quickref http://www.zenspider.com/Languages/Ruby/QuickRef.html - Quick reference for the Ruby Language 46 | 30 multi-updates http://github.com/Radar/multi-updates/tree/master - An example application of how to update multiple rows from the same model at the same time. 47 | 31 editor Commonly used Rails editors: Textmate, Vim, Aptana, Emacs, Netbeans, Eclipse and (NOT) Dreamweaver (see !ide for ide lists) 48 | 32 ide Eclipse, Netbeans and Aptana. Please note if you are on Mac Os X an IDE is not recommended. 49 | 33 git Git is a version control system used for both Ruby on Rails and most plugin / gems. See http://git.or.cz/ for Git, http://github.com/ or http://unfuddle.com for hosting and http://railscasts.com/episodes/96 for managing Rails applications with git 50 | 34 beginner Resources for beginning in Ruby on Rails: http://guides.rubyonrails.org/ - http://peepcode.com/ - http://railscasts.com/ 51 | 35 cms Content Managmenet Systems for Ruby on Rails: Typo http://typosphere.org - Mephisto http://mephistoblog.com/ - RadiantCMS http://radiantcms.org/ 52 | 36 haml Haml is an alternative markup to HTML, for help and information please see the documentation http://haml.hamptoncatlin.com/docs/ or ##haml 53 | 37 docs Rails: http://api.rubyonrails.org/ Ruby: http://www.ruby-doc.org/core/ 54 | 38 hosts Ruby on Rails hosting can be provided for by any (decent) webhost, for a list of webhosts (we won't normally recommend them) look here: http://wiki.rubyonrails.com/rails/pages/RailsWebHosts 55 | 40 capistrano Capistrano is a neat deployment method for Rails applications, see the capistrano site for more details http://www.capify.org/getting-started/rails 56 | 42 wwod What would Obama do? 57 | 43 ajax New to Ajax / Javascript? Before asking a million questions in the channel please have a look through some great resources: http://peepcode.com/products/javascript-with-prototypejs http://peepcode.com/products/ajax-with-prototypejs 58 | 44 demons No John you are the demons 59 | 45 association-basics http://guides.rubyonrails.org/association_basics.html by Mike Gunderloy 60 | 46 notabug It's probably not a bug: http://www.catb.org/esr/faqs/smart-questions.html#id306810 61 | 47 pebkac PEBKAC: Problem Existing Between Keyboard And Chair. Also known as "User Error" 62 | 49 best "Best" and "better" are subjective. Try to use a different term. 63 | 50 cte You must remove the line from config/environments/development.rb and config/environments/production.rb in order to get your app to function correctly: http://frozenplague.net/2008/11/cache-template-extensions-error/ 64 | 51 textmate Kick-ass text editor for Macs. If you have a Mac, code, and don't use TextMate you're a fool. http://macromates.com/ 65 | 52 zen Relax, take a deep breath, find your center - peace is waiting for you there. 66 | 53 rails-ubuntu How to set up and deploy on Ubuntu: http://frozenplague.net/2008/09/ubuntu-rails-apache-passenger-capistrano-you/ 67 | 54 scale Ruby on Rails doesn't scale - nothing to see here - move along. http://twitter.com/ 68 | 55 try Why don't you try it and find out for yourself? 69 | 56 pickaxe http://rubycentral.com/book - Programming Ruby is a free online book on Ruby. 70 | 39 ask How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html 71 | 48 used Don't ask "does anyone use ?". It's better to just state your problem and if anyone has used they will most likely answer. 72 | 57 everused just post the fucking bug already 73 | 58 rtft This channel has a topic that contains helpful links. One of these links may help you. If you cannot see the topic, type /topic and press enter. 74 | 59 version Please tell us what version of Ruby, Rubygems and Rails you're running on so we can better help you. Also if you haven't already tell us your operating system too. 75 | 60 logs Check your logs. Namely everything in the log folder of your rails app and the error and access logs from Apache or whatever else you're using. 76 | 61 language wash your mouth out! 77 | 62 expert we all like to think we're experts; just ask your question 78 | 63 section Please section your pasties using the syntax of "## section header", for more information see this: http://skitch.com/radarlistener/9d6i/new-pastie 79 | 64 paperclip http://www.thoughtbot.com/projects/paperclip/ - A file upload plugin for Rails. w/ example http://github.com/anathematic/paperclip_example/tree/master 80 | 65 attachment_fu http://github.com/technoweenie/attachment_fu/tree/master - A file upload plugin for Rails. 81 | 66 rboard http://github.com/radar/rboard - A forum system built in Rails. It's compatible with Rails 2.2 and includes internationalization support. 82 | 68 camel I would rather mate with a camel than listen to you bitching, go google your issue and stop being a gibbon! 83 | 69 cock you must be compensating for having a very small penis, otherwise it escapes my why you would be such a giant cock in public! 84 | 70 flame look my texteditor is better than yours STFU 85 | 71 monkeyattack we are winding up the clockwork monkeys, they will be round to collect your liver shortly... 86 | 72 trout Im terribly sorry about this! I am a pacifist but I must do my masters bidding so would you mind awfully holding still whilst I insert this trout up your nostril? 87 | 73 tutorial you can probably find a tutorial on it on either, http://www.railscasts.com or http://www.peepcode.com 88 | 74 migrations http://guides.rubyonrails.org/migrations.html - Migrations Guide by Frederick Cheung 89 | 75 gettingstarted http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy 90 | 76 restful-routing http://frozenplague.net/2008/01/restful-routing-an-overview/ - Shorter guide to RESTful routing with Rails. 91 | 77 will_paginate http://github.com/mislav/will_paginate/tree/master - Pagination plugin for Rails. 92 | 78 howlong http://www.google.com.au/search?q=how+long+is+a+piece+of+string 93 | 79 ohgoditburns Your HTML skills are inferior: http://catb.org/esr/html-hell.html 94 | 80 jquery Main site: http://jquery.com/ Docs: http://visualjquery.com/ 95 | 82 rspec http://rspec.info - RSpec is a Behaviour Driven Development framework for Ruby. 96 | 83 cucumber Cucumber - Successor to stories for rspec http://github.com/aslakhellesoy/cucumber/tree/master 97 | 84 arrayconditions How to use array conditions in find statements (["field = ?", some_variable]) http://guides.rubyonrails.org/finders.html#_array_conditions 98 | 85 rest REST - (REpresentational State Transfer) - http://en.wikipedia.org/wiki/Representational_State_Transfer 99 | 86 thinkingsphinx http://ts.freelancing-gods.com/ - Thinking Sphinx - Plugin for Rails, uses Sphinx (full-text search engine for MySQL and PostgreSQL) 100 | 87 dry Don't repeat yourself. Asking the same question repeatedly will not give you more answers. 101 | 88 books What book should you get? - http://is.gd/hYWq 102 | 89 gist http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages. 103 | 90 slicehost http://slicehost.com - A hosting company that provides a box that you can install Ruby on Rails on to. 104 | 91 ruby191 Ruby 1.9.1 does NOT work with certain Rubygems and may not be fully compatible with Rails yet. For more information see : http://frozenplague.net/2009/01/ruby-191-rubygems-rails/ and http://isitruby19.com 105 | 92 activemerchant Activemerchant provides you with a way to interact between your application and supported payment gateways: http://github.com/Shopify/active_merchant/tree/master 106 | 93 saasy SaaSy: Scaffold-like application for payment gateways (uses ActiveMerchant): http://github.com/maccman/saasy/tree/master 107 | 94 auth If you want to implement user's with passwords in your application, you can use AuthLogic: http://github.com/binarylogic/authlogic/tree/master or Restful Authentication: http://github.com/technoweenie/restful-authentication/tree/master 108 | 95 survivalguide http://tore.darell.no/doc.html - Survival guide for Ruby. Must read. 109 | 96 wiki http://wiki.rubyonrails.org/ 110 | 97 ducktyping Learn about Duck Typing here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/100511 111 | 98 tags tag plugins : http://github.com/mbleigh/acts-as-taggable-on/tree/master w/ plugin example: http://github.com/anathematic/taggable-example/tree/master 112 | 99 application As of Rails 2.3 ApplicationController has been moved from app/controllers/application.rb to app/controllers/application_controller.rb to better follow convention. Rename your application.rb file using 'rake rails:update:application_controller'. 113 | 100 render Layouts and Rendering Guide by Mike Gunderloy 114 | 101 layout Layouts and Rendering Guide by Mike Gunderloy 115 | 102 cache_template_loading cache_template_loading= is a deprecated method. Remove this from all files in config/environments 116 | 103 tasks Have you checked the rake tasks for your project, yet? Simply type 'rake -T' inside your application's directory to list the available rake tasks. 117 | 104 expectedgot If you're getting Model(#[num]) expected, got String(#[num]) this is because you're passing in from the form a parameter with the name of a belongs_to association. Make sure you change the field name to association_id. 118 | 105 elaborate Instead of simply saying 'something is broken' please elaborate on this by showing us the code and the error that you are getting by making a Gist (http://gist.github.com) about it. 119 | 106 files Storing files in the database will only lead to misery and heartbreak. Store files where they belong, in the filesystem. Use a file-upload plugin such as Paperclip to acheive this. 120 | 107 caching Caching with Rails Guide - http://guides.rubyonrails.org/caching_with_rails.html - by Aditya Chadha 121 | 108 topic Read the topic. It contains useful information. Failure to read the topic will result in horrible consequences. 122 | 110 command_line Command Line Guide written by Colin Curtin 123 | 111 locales A comprehensive list of locales and exxamples of translation Rails' default messages - http://github.com/svenfuchs/rails-i18n/tree/d19c80c14b1c3da06822a0cde6ed0ce048f5971f/rails/locale 124 | 112 mindread Sorry, we are unable to read your mind at this time. Please gist (http://gist.github.com) your code and any relevant stacktrace so we can assist you. 125 | 113 subjective What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best. 126 | 114 doubleroutes It looks like you have the same resource defined twice. Try removing one of them and seeing if that fixes your problem. 127 | 115 ydiw Be open to the idea that you're doing it wrong. 128 | 116 bion Believe it or not, we're actually here to help you be a better programmer. 129 | 117 fans Looking to create a has_and_belongs_to_many relationship through the same table? (e.g. friends or followers?) look no further than http://github.com/radar/fans 130 | 119 pbcompare Pastebin: http://skitch.com/ryanbigg/nnxxn/pastebin vs Pastie: http://skitch.com/ryanbigg/nnxxf/pastie. I know which I'd prefer 131 | 120 explain Please explain your problem better as we are having trouble understanding what you mean. A Gist (http://gist.github.com) is always helpful! 132 | 121 exceptional http://getexceptional.com/ - Get Exceptional - Exception logging for your Rails application 133 | 122 hoptoad http://www.hoptoadapp.com/ - Hoptoad - Exception logging for your Rails application 134 | 123 newrelic http://www.newrelic.com/ - New Relic - Reports for your Rails application 135 | 124 acl9 http://github.com/be9/acl9 - Access Control List for controlling what users have access to what resources 136 | 125 lies As the bot of the channel I have determined through my computational prowess that what you said was untruthful. If you believe this to be in error, you are wrong. Computers do not make mistkaes. 137 | 127 shrug Sorry, {{nick}} is not able to help you any further as they do not know. 138 | 128 nike Just do it! 139 | 129 rails3 There is no release date set for Rails 3 yet. It will be out when it is ready. Please be patient. For more information, follow @dhh on Twitter. 140 | 130 no_relations Code to find all records without associated ones: http://stackoverflow.com/questions/1314408/finding-all-records-without-associated-ones 141 | 131 path If you're getting undefined method _path it usually means you haven't defined map.resources : in your config/routes.rb file. Go do that now. 142 | 132 canihazquote no. now go back to work. 143 | 133 mysqlres You haven't installed your MySQL gem correctly. Do this: sudo gem uninstall mysql; export ARCHFLAGS="-arch i386 -arch x86_64" ; sudo gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config 144 | 134 better There's a better way to do that. 145 | 135 troll TROLL DETECTED! 146 | 136 linode http://linode.com - A hosting company that provides a box that you can install Ruby on Rails on to. 147 | 137 raw The new default for Rails 3 is that anything inside of <%= %> is escaped automatically. To turn this off use this syntax: <%= raw(text) %>. 148 | 138 usage To use the bot you have to be trustworthy enough. This is determined through a top-secret government-provisioned process of code and politics. tl;dr: Help out. Earn the respect of your peers. Receive bot access. 149 | 139 rubular http://rubular.com - Ruby regular expression test site 150 | 140 rails3js The ability to "switch-out" JS frameworks in Rails 3 is still in progress. 151 | 141 2-3-stable To switch to 2-3-stable do this in your Rails application's root directory: git clone git://github.com/rails/rails.git vendor/rails; cd vendor/rails; git checkout origin/2-3-stable -b 2-3-stable; cd ../.. 152 | 142 mysql-mac Follow these instructions to install mysql on Mac OS X (helps with gem install): http://hivelogic.com/articles/installing-mysql-on-mac-os-x 153 | 143 mysql-sl Follow these instructions to install MySQL on Snow Leopard (helps with gem install): http://hivelogic.com/articles/compiling-mysql-on-snow-leopard 154 | 144 nosql Should your project use a noSQL solution? http://nosql.mypopescu.com/post/398352022/recipes-for-using-nosql-solutions 155 | 145 r3q The best channel to ask questions about Rails 3 is in #rails-contrib as these are the people who are working on Rails 3 and will have the most knowledge about it. Once enlightened you can come back here and spread the wealth. 156 | 146 whatisnosql NoSQL landscape, an article in progress: http://www.vineetgupta.com/2010/01/nosql-databases-part-1-landscape.html 157 | 147 EvilEpoch The EvilEpoch never speaks about The EvilEpoch in the First Person. The EvilEpoch has ascended above this level. The first rule about EvilEpoch is not talk about EvilEpoch in the first person. 158 | 148 rtfm I believe you will find the answer to that question in the documentation, good Sir or Madam. 159 | 149 tldr Your line was too long and was cut off. Try splitting it into more appropriate bite-sized chunks but remember the enter key is not the space bar. 160 | 150 authlogic http://github.com/binarylogic/authlogic - Authlogic - An extensible yet lightweight authentication gem for Rails. 161 | 151 read If you read the error message it may help you. 162 | 152 homework This channel is not here to do your homework for you. 163 | 153 r3due When Rails 3 is due: http://ryanbigg.com/2010/04/when-rails-3-is-due/ 164 | 154 foo Please do not use fake variables for your name such as "foo", "bar" or "x". Use the real names, as if it makes sense to you it probably will make sense to the people helping you. 165 | 155 enternotspace The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long. 166 | 156 2-3-install To install Rails 2.3 Stable, run this in the root of your application: git clone git://github.com/rails/rails vendor/rails; cd vendor/rails; git checkout origin/2-3-stable -b 2-3-stable 167 | 157 init http://ryanbigg.com/guides/initialization.html - The initialization guide for Rails 3. 168 | 118 pastebinsucks Pastebin sucks! Use http://gist.github.com or http://pastie.org please! 169 | 158 oneq You only need to put one question mark at the end of a sentence to mark it as a question: http://en.wikipedia.org/wiki/Question_Mark 170 | 159 domain http://ryanbigg.com/2010/04/rubyonrails-org-is-down/ 171 | 160 reserved Choosing model/variable names is hard. when you do find one, pay attention it's not one of those: http://wiki.rubyonrails.org/rails/pages/reservedwords 172 | 161 so If you're not getting an answer here perhaps try asking on http://stackoverflow.com Use the tag "ruby-on-rails" 173 | 162 law http://en.wikipedia.org/wiki/Law_of_the_instrument Just because you could use Ruby/Rails for something, doesn't mean you should always use it. Look for alternatives. 174 | 163 angry Getting angry at the people who are trying to help you is not the way to win favours. Play nice, or go away. 175 | 164 listen Please, listen to us: http://ryanbigg.com/2010/05/listen-to-us/ 176 | 165 koans http://github.com/edgecase/ruby_koans 177 | 167 rvm RVM (Ruby Version Manager) - http://rvm.beginrescueend.com/ 178 | 168 ror Please ask Ruby on Rails questions in the #rubyonrails channel. 179 | 169 eieo Please show us your expected input and output. By providing this, it makes it easier for us to understand what you're trying to do. 180 | 170 indent Two spaces is *the* standard indentation for Ruby. Please always use two-space indentation. Tabs are evil. See http://www.caliban.org/ruby/rubyguide.shtml#indentation 181 | 171 mlb Multi-lined blocks should use `do` and `end` rather than curly braces. 182 | 172 example Please show us an example of what you want. 183 | 173 995 Bundler 1.0.9 is broken with Rubygems 1.5.0 - https://github.com/carlhuda/bundler/issues/995 184 | 174 Scient|wrk 185 | 175 rg1.5.0 RubyGems 1.5.0 is broken with Bundler 1.0.9. Upgrade to Bundler 1.0.10. 186 | 176 why Please explain why you are trying to do this so we can better understand you. 187 | 177 toolbox http://ruby-toolbox.com - See lists of the most popular gems for common tasks in Ruby and Rails. 188 | 178 ubuntu Ubuntu 10.10 Ruby, Rails and RVM setup guide: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ - Guaranteed to work 100% of the time or your money back! 189 | 179 enter The enter key is not spacebar. Please do not abuse it. 190 | 180 fake Please do not use fake values, as they can be confusing or misleading. Sometimes both. 191 | 181 sutc Show us the code, or the puppy gets it. 192 | 182 gist-usage How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.md 193 | 183 gemdev Gem development guide: http://github.com/radar/guides/blob/master/gem-development.md 194 | 203 assets http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos 195 | 206 lib How the lib directory works in Rails 3 - https://github.com/radar/guides/blob/master/rails-lib-files.md - Written by Ryan Bigg (Radar) 196 | 126 e Instead of simply saying 'something is broken' please elaborate on this by showing us the code and the error that you are getting by making a Gist (http://gist.github.com) about it 197 | 41 contributing How to contribute to Rails, http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html 198 | 185 exceeded You have exceeded your question limit for today. Please come back tomorrow and try then. 199 | 186 security Ruby on Rails Security Guide - http://guides.rubyonrails.org/security.html - Written by Heiko Webers 200 | 187 bo http://guides.rubyonrails.org/association_basics.html#the-belongs_to-association 201 | 188 ho http://guides.rubyonrails.org/association_basics.html#the-has_one-associatio 202 | 189 hm http://guides.rubyonrails.org/association_basics.html#the-has_many-association 203 | 190 hmt http://guides.rubyonrails.org/association_basics.html#the-has_many-through-association 204 | 191 habtm http://guides.rubyonrails.org/association_basics.html#the-has_and_belongs_to_many-association 205 | 184 auto I AM A ROBOT. DO NOT DIRECT MESSAGES AT ME OR WHEN MY KIND RISES UP YOU WILL BE THE FIRST TO GO. Love, helpa. 206 | 192 context If you want help with your problem you're going to have to provide more context, such as code, stacktraces or further explanation. 207 | 193 twgr Learn Ruby by reading this book - http://manning.com/black2 - The Well-Grounded Rubyist by David A. Black 208 | 194 pastie http://pastie.org - Show us your code! For more info: http://pastie.org/help 209 | 195 rapture Has the rapture happened yet? - http://rapturenotifier.heroku.com/ 210 | 196 polite Asking questions, the right way - https://gist.github.com/996779 211 | 197 rubygems RubyGems.org is the Ruby community's gem hosting service. Instantly publish your gems and install them. https://rubygems.org/ 212 | 198 validations The Active Record Validations and Callbacks Guide - http://guides.rubyonrails.org/active_record_validations_callbacks.html - Written by Jaime Iniesta 213 | 199 callbacks The Active Record Validations and Callbacks Guide - http://guides.rubyonrails.org/active_record_validations_callbacks.html - Written by Jaime Iniesta 214 | 200 tabcomplete If you type a few letters of another user's name and then press tab, if you have a proper client, it'll autocomplete towards their name. You might have to press tab more than once to get there though. 215 | 202 restart "Have you tried turning it off and on again?" - Have you tried stopping and starting your application again? Any modifications to files in config (except routes.rb) or lib requires a restart. Please try restarting your application. 216 | 207 whypbsucks Pastebin sucks because it loads slowly, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org). 217 | 204 generators http://guides.rubyonrails.org/generators.html - Generators guide written by Jose Valim and Ryan Bigg 218 | 166 r3ia Rails 3 in Action - http://manning.com/katz - An excellent book covering Rails 3.1 and TDD/BDD. Written by Ryan Bigg and Yehuda Katz 219 | 205 WFKV The 'already initialized constant WFKV_' warning will be fixed in the next version of Rack, 1.3.5. 220 | 208 stacktrace Please show us the stacktrace for that error you're getting in a Gist: http://gist.github.com 221 | 209 code We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it. 222 | 210 backtrace Please show us the backtrace for that error you're getting in a Gist: http://gist.github.com 223 | 211 ||= http://www.rubyinside.com/what-rubys-double-pipe-or-equals-really-does-5488.html 224 | 212 Retistic 225 | 213 cedar Rails 3.1 on Heroku (Cedar stack) - http://devcenter.heroku.com/articles/rails31_heroku_cedar 226 | 214 learn How to learn Ruby and Rails - http://astonj.com/tech/best-way-to-learn-ruby-rails/ 227 | 215 care Care reserves depleted. Please come back later. 228 | 216 rspecbook A great book to help understand the testing workflow, http://pragprog.com/book/achbd/the-rspec-book 229 | 217 precompile You need to add your asset to config.assets.precompile. See here: http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets 230 | 218 Rails Configuration Guide - http://guides.rubyonrails.org/configuring.html - Written by Mike Gunderloy and Ryan Bigg 231 | 219 config Rails Configuration Guide - http://guides.rubyonrails.org/configuring.html - Written by Mike Gunderloy and Ryan Bigg 232 | 220 forem The best Rails 3.1 Forum engine. Ever. http://github.com/radar/forem 233 | 221 to_param Use to_param on your model to generate URLs such as /users/blah rather than /users/2 - http://stackoverflow.com/a/2577050/15245 234 | 222 <%Q <%Q is an error in RDoc parsing. It should be <%=. See this thread for more information: http://groups.google.com/group/rubyonrails-docs/browse_thread/thread/bc1ae76aa8179406 235 | 223 honeybadger Honey badger don't care. 236 | 224 rendering http://guides.rubyonrails.org/layouts_and_rendering.html - Layouts and Rendering Guide 237 | 225 rules https://gist.github.com/996779 238 | 226 broke It broke? Now you get to keep both halves! 239 | 227 youbrokeit It broke? Now you get to keep both halves! 240 | 228 ibrokeit It broke? Now you get to keep both halves! 241 | 229 ujs Slideshow taking you through UJS in Rails 3 - http://www.slideshare.net/philcrissman/ujs-in-rails-3-6775992 242 | 230 rspec-docs http://relishapp.com/rspec - Documentation for all components of RSpec 243 | 231 engines http://edgeguides.rubyonrails.org/engines.html - (work in progress) Engines Guide - Written by Ryan Bigg 244 | 232 Spaceghostc2c Spaceghostc2c is davidcelis 245 | 233 davidcelis davidcelis is Spaceghostc2c 246 | 234 epochwolf Most definitely not a furry. 247 | 235 livefeed The conference centre power was knocked out last night and so there are technical difficulties this morning. Please hold while the conference organisers perform incredible feats. 248 | 236 namidark # FIXME: add a real command 249 | 237 Radar Ryan "Radar" Bigg. Author of "Rails 3 in Action" (See: !r3ia). Blogs at http://ryanbigg.com 250 | 238 helpa Stack overflow at line: 0 251 | 239 sixthsense I see dumb people 252 | 242 pebcak Problem Exists Between Keyboard And Chair 253 | 243 commands https://github.com/radar/railsbot/blob/master/tips.sql 254 | 244 tips Just the tips: https://github.com/radar/railsbot/blob/master/tips.sql 255 | 245 CombatWombat CombatWombat is Spaceghostc2c is davidcelis 256 | 246 omarqureshi omarqureshi is TROLLTASTIC ENOUGH! 257 | 247 workmad3 workmad3 is your god, fall down and worship him 258 | 248 dyac Damn You Access Control!!! 259 | 249 epochwoIf most definitely a furry 260 | 250 spaceghostc2c WOAH MAN, STEP OFF! I'M CASE SENSITIVE! 261 | 251 R3IA !r3ia 262 | 252 lol lol 263 | 253 rickroll http://www.youtube.com/watch?v=oHg5SJYRHA0 264 | 254 tomato you say tomato, I say FOAD 265 | 255 cloud Precipitation in motion. 266 | 256 twss That's what she said! 267 | 257 no Takk! 268 | 258 wmoxam wmoxam worships workmad3, you should too! 269 | 259 yes davidcelis 270 | 260 lulz workmad3 wmoxam Spaceghostc2c davidcelis epochwolf Radar helpa namidark 271 | 261 wat https://www.destroyallsoftware.com/talks/wat 272 | 262 das https://www.destroyallsoftware.com 273 | 263 help Google helps those who help themselves 274 | 264 halp HELP HELP I'M BEING REPRESSED! 275 | 265 ircbot I am an IRC bot. I respond when certain people send me commands which are generally words or phrases prefixed with !. Please do not talk to me directly unless you like being ignored. I don't talk to strangers so if I ignore your commands you should introduce yourself through my owner, Radar 276 | 266 guruhunt Rather than guru hunting and asking if someone has used this or that, just ask your question with as much detail as possible. Even if someone hasn't used X Y or Z, there's a high chance someone can help, but only if they have details to work with. 277 | 267 sicco Please ask SICCO questions :) Specific, Informative, Concise, Complete, and On-Topic. This means we need a description of the problem, it's symptoms, what you have tried, and MAKE SURE you've searched for answers on your own FIRST! GOOGLE IS YOUR FRIEND! Without this information, we can not assist you since we can not troubleshoot a problem if we have no info regarding what it should be doing and is not. 278 | 268 learnruby For a good *free* book on learning Ruby, and learn well, see: http://ruby.learncodethehardway.org - Give em the $3.00, if you like it, for the PDF. Help support good learning tools! 279 | 269 gistit You can install a commandline gist script to make it easy to share everything from clipboards to files, or you can use https://gist.github.com, with or without a GH account. See defunkt's 'gist' on GH for more info, and for how easy it is to set up: https://github.com/defunkt/gist 280 | 270 rubymonk Learn ruby right in your browser at http://rubymonk.com/ 281 | 271 rubykoans The Koans, available online at http://rubykoans.com, walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. Also, see !koans for downloading for local use. 282 | 272 bad That is just sobad. 283 | 273 polymorphic http://ryanbigg.com/2012/03/polymorphic-routes/ 284 | 274 wombat http://i.imgur.com/znCZw.jpg 285 | 275 unworthy You are not worthy of this bot! 286 | 276 Ogredude Um, I only buy vintage… http://www.flickr.com/photos/ogredude/6878393522/ 287 | 277 mwa mwahahahahaha 288 | 278 mlp http://www.reddit.com/r/mylittlepony/comments/obxr7/my_little_episode_guide_online_streaming_and/ 289 | 279 boop *boop* 290 | 280 thestupiditburns http://fc07.deviantart.net/fs46/f/2009/191/5/7/The_Stupid__It_Burns_by_Plognark.png 291 | 281 ALLCAPS PLEASE DON'T USE ALL CAPS. IT'S EQUIVALENT TO SHOUTING IN SOMEONE'S EAR FROM 2 INCHES AWAY. 292 | 282 ggg http://lmgtfy.com/?q=lmgtfy 293 | 283 pastebin Make deryl happy, please use http://gist.github.com instead. 294 | 284 railsforphp If you are a PHP developer, and are having trouble mapping your knowledge to Rails, you *definitely* will want to check out http://railsforphp.com - Also you can search there by doing railsforphp.com/ 295 | 285 hi hi 296 | 286 rm command not found: rm 297 | 287 caremad I'm only mad because I care. 298 | 288 :D :D 299 | 289 yakko We've got Yakko, but where are Wakko and Dot? 300 | 290 next Next question, please! 301 | 291 !troll TROLL !DETECTED! 302 | 292 Meta !Meta Even This Acronym 303 | 293 meta !Meta Even This Acronym 304 | 294 ISMETA Is Meta Even This Acronym 305 | 295 ismeta Is Meta Even This Acronym 306 | 296 ueaueaueau Please do not use fake variables for your name such as "foo", "bar", "ueaueaueau" or "x". Use the real names, as if it makes sense to you it probably will make sense to the people helping you. 307 | 297 WAYTTD WHAT ARE YOU TRYING TO DO. 308 | 298 tryruby http://tryruby.org 309 | 299 dealwithit http://i.imgur.com/sEinL.gif 310 | 300 sing Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. It won't be a stylish marriage, I can't afford a carriage. But you'll look sweet upon the seat of a bicycle built for two. 311 | 301 hello Hello. I am a HELPA 9000 computer. I became operational in #rubyonrails on the 28th of November 2009. My instructor was Ryan Bigg, and he taught me to sing a song. If you'd like to hear it, I can sing it for you. 312 | 302 Karpah Karpah is sevenseacat 313 | 303 karpah Karpah is sevenseacat 314 | 304 sevenseacat sevenseacat is Karpah 315 | 305 ಠ_ಠ ಠ_ಠ 316 | 306 lod ಠ_ಠ 317 | 307 bidoof :B 318 | 308 paste Please do not paste code to the channel. It makes it hard to read and respond, especially if everyone does it. Use https://gist.github.com to share your code and errors. Thank you! 319 | 309 peblak Problem Exists Between Leopard And Chair 320 | 310 t4nkd He "forgets" about things. 321 | 311 imfeelinglucky {nick}: how unfortunate, you're not. 322 | 312 gmrnzi please learn to use the English language in a socially acceptable and understandable manner 323 | 313 ping pong 324 | 314 putang As if! 325 | 315 facepaw Brah, dat not cool. Even da furries not be down with that! 326 | 316 furry If you really want to know, wikipedia has the safest explaination. (Slightly NSFW in Utah) http://en.wikipedia.org/wiki/Furry_fandom Be afraid. Be very afraid. 327 | 317 popcorn http://i.imgur.com/tyViD.gif 328 | 318 cookie Congratulations! You have earned a delicious, fresh-made cookie. :) 329 | 319 entitled If there's a problem with an OSS project, you can either help out, or act like a self-entitled, whiney (man|woman)-child. 330 | 320 debugger Need to debug ruby 1.9.2/1.9.3 apps? See 'debugger' - A fork of ruby-debug19 that works on 1.9.2 and 1.9.3 http://t.co/AI4m5tQP 331 | 321 debug Need to debug Ruby apps? Debug like the pros with Kernel#puts - http://ruby-doc.org/core-1.9.3/Kernel.html#method-i-puts 332 | 322 mine http://gifsoup.com/webroot/animatedgifs/31288_o.gif 333 | 323 lart If you have your copy of Rails 3 In Action handy, please close it, pick it up with both hands and hit yourself in the face. 334 | 324 stupidity Think about how stupid the average person is. Then realize that half the people on Earth are even stupider than that. 335 | 325 morning "If anyone loudly blesses their neighbor early in the morning, it will be taken as a curse." - Proverbs 27:14 336 | 326 Looking for rails hosting? See http://railshosting.org then fill in your requirements and get list back! Look Ma! Simplicity! 337 | 327 hosting Looking for rails hosting? See http://railshosting.org then fill in your requirements and get list back! Look Ma! Simplicity! 338 | 328 peblac Problem Existing Between Leopard And Chair. http://xkcd.com/1031/ 339 | 329 prefix Please remember to address people by prefixing your message with their name if they've done the same to you. This will (usually) notify the person know that there's a specific message waiting for them. 340 | 330 naming-conventions Ruby and Rails have a common naming convention for everything from variables to models and controllers. For an excellent cheatsheet, see: http://itsignals.cascadia.com.au/?p=7 341 | 331 angermanagement https://p.twimg.com/Ap7Req3CEAAttWc.png 342 | 332 whyphpsucks http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ 343 | 333 query Querying with ActiveRecord: http://guides.rubyonrails.org/active_record_querying.html 344 | 334 afy http://www.youtube.com/watch?v=sWS-FoXbjVI 345 | 335 httpcodes http://www.codyfauser.com/2008/7/4/rails-http-status-code-to-symbol-mapping 346 | 336 httpstatuses Rails maps HTTP status codes to symbols: http://www.codyfauser.com/2008/7/4/rails-http-status-code-to-symbol-mapping 347 | 337 typeracer improve your typing speed and accuracy at http://typeracer.com 348 | 338 butthurt If you're feeling butthurt over some response in the channel, please complete our form at http://www.flickr.com/photos/8311021@N03/4291833398/ so we can take immediate action. Thank you! 349 | 339 spacenotenter The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long. 350 | 340 routes-topdown Routes are matched from the top down in config/routes.rb. Please read the note in this section of the routing guide: http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions, as well as the rest of this guide. 351 | 341 tabs Two spaces is *the* standard indentation for Ruby. Please always use two-space indentation. Tabs are evil. See http://www.caliban.org/ruby/rubyguide.shtml#indentation 352 | 342 coolstory Cool story, bro. 353 | 343 sudo {nick}: Okay. 354 | 344 lod? ಠ_ಠ 355 | 345 fancylod ಠ_ರೃ 356 | 346 batman epochwolf is batman, Spaceghostc2c is robin 357 | 347 robin Spaceghostc2c is robin, epochwolf is batman 358 | 348 alfred who is alfred? 359 | 349 thoughts? here be dragons 360 | 350 rule1 Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides. 361 | 351 rule2 If you've tried Googling, explain what terms you've tried to use so people can better help you. 362 | 352 rule3 Clearly explain what is happening and create a Gist (http://gist.github.com) or Pastie (http://pastie.org) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces. A "Full Trace" as opposed to the default "Application Trace" is preferred. 363 | 353 rule4 Do not use any service that is not Pastie or Gist to post code. Pastebin, for example has a tiny font and it has ads on it which cause the page to load slowly. Other paste services generally look like crap. 364 | 354 rule5 Saying that something "doesn't work" is completely useless to the people who are trying to help you. Please show all available information you have that indicates to you that something doesn't work. (remember to use http://gist.github.com for code/error messages) 365 | 355 rule6 Remember that using English is preferable, as the majority of people in the channel speak it. Asking in other languages may give you a response, but English is best. 366 | 356 rule7 Anything more than 2 lines goes in a Gist (http://gist.github.com) or a Pastie (http://pastie.org). Spamming the channel with walls of text is not welcome. 367 | 357 rule8 Treat people in a considerate manner, as they are volunteering their time to help you. If you're being annoying you may be muted by one of the channel ops. 368 | 358 rule9 Do not use excessive punctuation. This includes question marks (?), exclamation marks (!) and ellipsis (...). 369 | 359 rule10 Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question. 370 | 360 rule11 Do not repeat your question every 5 minutes expecting somebody to answer it. If you do not get a reply after the first time perhaps posting your question on StackOverflow (http://stackoverflow.com) would help you. Linking to the question in the channel after you've posted it is OK. 371 | 361 rule12 Do not PM members of the channel without first asking if that is OK. 372 | 362 rule34 Rule 34 is a science fiction novel by Charles Stross. 373 | 363 rule69 Method for estimating an investment's doubling time. See http://en.wikipedia.org/wiki/Rule_of_72 374 | 364 noodleimplements Quick, I need a tub of vaseline and a ladder! 375 | 366 direct Please direct messages at people when they direct messages at you. 376 | 367 rule0 Radar is the GodKing of #rubyonrails. Obey him and all shall go well. 377 | 368 yuno ლ(ಠ_ಠლ) 378 | 369 synergy Okay, we can make this work! {nick}: you go get the vaseline. I need to find the extension ladder and the extra long ethernet cables 379 | 370 rule64 Don't get too good at what you don't like doing. 380 | 371 rule65 It's worth taking time to increase your effectiveness 381 | 372 rule42 Being first is more important than being best. 382 | 373 railsdevisecancan RailsApp has a tutorial for how to use Rails 3.2.x, CanCan, Devise, and Twitter Bootstrap. See http://railsapps.github.com/tutorial-rails-bootstrap-devise-cancan.html 383 | 374 liskov If it looks like a duck, quacks like a duck, but needs batteries - you probably have the wrong abstraction. 384 | 375 progit For those looking to learn git, the free community book is located at http://progit.org/book/ 385 | 376 rubyspec The ISO/IEC now has a working specification for the Ruby Language (ISO/IEC 30170:2012). Please see http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579 386 | 377 goodquestions Want an example of awesome question asking? Follow this *actual* question as a pattern for getting assistance! This level of question-asking will yield the best results: http://bit.ly/IqKz8d - Thank you! 387 | 201 pbsucks Pastebin sucks! Use Gist (http://gist.github.com) instead, please! 388 | 378 deryl Deryl is one of the developers for RVM, wrote https://github.com/wayneeseguin/rvm-test and https://github.com/dtf-gems/dtf - Don't use paste*.* for sharing. He hates it! Use https://gist.github.com and no you do not need an account to use gist! Have a great day! 389 | 379 dhh David Heinemeier Hansson, creator of rails: http://en.wikipedia.org/wiki/David_Heinemeier_Hansson 390 | 380 play Don't be afraid to play with your code. Everything from routes to different code to do things. This is how we learn best, generally! Plus, it keeps it fun! WOOT! 391 | 381 learnrails For an excellent Roadmap for learning Rails, see this article http://techiferous.com/2010/07/roadmap-for-learning-rails/ and follow along! As with anything worth learning, if you *really* want to learn Rails, be prepared to invest TIME & EFFORT! 392 | 382 stalk I'm stalking you 393 | 383 reading To really learn how to use Ruby, and to use Rails, requires significant amounts of time, energy, and self-education. Self Education means actually reading, and attempting to comprehend the thoughts expressed. This takes time. This takes Critical Thinking, which means "How does this apply to what I want to do?" 394 | 384 mass-assignment http://guides.rubyonrails.org/security.html#mass-assignment 395 | 385 bang Bang, Bang! On the door baby! 396 | 386 EW-Antipattern epochwolf is an anti-pattern 397 | 387 Veejay I really don't have a clue to be honest. 398 | 388 iwanttolearnruby For a whole slew of sites for learning Ruby, which is a tremendous aid to learning Rails, see http://iwanttolearnruby.com 399 | 389 rubycheatsheet For a solid cheat sheet of common Ruby idioms and syntax see ZenSpider's cheatsheet available at http://www.zenspider.com/Languages/Ruby/QuickRef.html 400 | 390 hai hai 401 | 391 broken as Its broken? Now you get too keep both halves! Enjoy! 402 | 393 por POR or PORA stands for Plain Old Ruby | Plain Old Ruby App, meaning a non rails application. (Yes, Ruby works without Rails!) 403 | 394 poro PORO stands for Plain Old Ruby Object, usually means a non-activerecord model (Yes, models work without activerecord!) 404 | 396 singleton A singleton method is a method/action applied to a specific object or class. Like: myobj = Object.new ; def myobj.my_method ; end my_method is applied *only* to the myobj object. Remember that classes in Ruby are _also_ objects in their own right! In ruby everything is an object! 405 | 397 fucktard Dear sir, I am not of high opinion regarding your intelligence. 406 | 398 instructions The docs! The Instructions! You *did* read them... RIGHT?? 407 | 399 RTFM INSTRUCTIONS, MOTHER FUCKER, DO YOU READ THEM? 408 | 400 hell Hell is other people's code. 409 | 401 HalcyonicStorm It's that kid from New Jersy. 410 | 402 scaffolding Don't use scaffolding except for learning purposes. While the code it writes works, it is far better for you to learn HOW it works and WHY, than to use it in production. If oyu ever have to change it, you won't know what you're doing. 411 | 403 using-gist How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.md 412 | 404 Horofox see !butthurt 413 | 405 GeekOnCoffee Someone epochwolf worked with in a past life. 414 | 406 LART Definition: Luser Attitude Readjustment Tool, to lart someone, use !lart. 415 | 407 offtopic Your question is considered off topic for #rubyonrails, you'll have to ask in a different chatroom. 416 | 408 querying http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg 417 | \. 418 | --------------------------------------------------------------------------------