Skip to content

Instantly share code, notes, and snippets.

View muffinista's full-sized avatar

Colin Mitchell muffinista

View GitHub Profile
diff --git a/lib/awsbase/support.rb b/lib/awsbase/support.rb
index 6d40f37..4b4b1fe 100644
--- a/lib/awsbase/support.rb
+++ b/lib/awsbase/support.rb
@@ -1,7 +1,7 @@
# If ActiveSupport is loaded, then great - use it. But we don't
# want a dependency on it, so if it's not present, define the few
# extensions that we want to use...
-unless defined? ActiveSupport::CoreExtensions
+
# If ActiveSupport is loaded, then great - use it. But we don't
# want a dependency on it, so if it's not present, define the few
# extensions that we want to use...
unless defined? ActiveSupport
# These are ActiveSupport-;like extensions to do a few handy things in the gems
# Derived from ActiveSupport, so the AS copyright notice applies:
#
#
#
# Copyright (c) 2005 David Heinemeier Hansson
/**
* Processing brush for SyntaxHighlighter, updated for version 3.0
*
* SyntaxHighlighter is at http://alexgorbatchev.com/SyntaxHighlighter
*
* @copyright
* Copyright 2011 Colin Mitchell [email protected]
*
* @license
* Licensed under The Do What The Fuck You Want To Public License (WTFPL)
#!/bin/ruby
require 'skeleton'
class BuyThatBot < Skeleton
def search
debug "check for tweets since #{@config[:since_id]}"
#
# search twitter
@muffinista
muffinista / gist:992405
Created May 26, 2011 01:56
A Simple Twitter Bot
## If I wanted to exclude some terms from triggering this bot, I would list them here.
## For now, we'll block URLs to keep this from being a source of spam
exclude "http://"
blacklist "mean_user, private_user"
puts "checking for replies to me"
replies do |tweet|
# replace the incoming username with the handle of the user who tweeted us
@muffinista
muffinista / build.rb
Created May 29, 2011 00:56
A Horoscope Randomizer
#!/usr/bin/env ruby
#
# original source for markov code: http://blog.segment7.net/articles/2006/02/25/markov-chain
#
require 'rubygems'
require 'optparse'
require 'sqlite3'
@muffinista
muffinista / mirror_magick.rb
Created June 3, 2011 15:37
A Twitter Bot that responds to "Mirror Mirror on the wall"
#!/usr/bin/env ruby
require 'rubygems'
require 'chatterbot/dsl'
@reply_list = [
"#USER#, Why it's you!",
"#USER# it's you of course!",
"It's totally #USER#",
"Since you asked, it's definitely #USER#"
@muffinista
muffinista / LICENSE.txt
Created October 16, 2011 01:54
Chatterbot License
DO WHAT THE FUCK YOU WANT TO -- BUT DON'T BE AN ASSHOLE PUBLIC LICENSE
Version 1, May 2011
Copyright (C) 2011 Colin Mitchell <[email protected]>
Derived from WTFPL, Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@muffinista
muffinista / bot.rb
Created November 23, 2011 00:58 — forked from squarism/bot.rb
bot reply test
$LOAD_PATH.unshift File.dirname(__FILE__) + "/lib"
require 'chatterbot/dsl'
require 'pokerthing'
exclude "http://" # block spam tweet
blacklist "jerkface, assbutt" # block jerks or self
#debug_mode true
@muffinista
muffinista / 1 - setting up RVM.sh
Created August 6, 2012 16:36
RVM and Bundler on Dreamhost
#
# Step One - Installing RVM
#
curl -L https://get.rvm.io | bash -s stable --ruby
# Then, install ruby 1.8.7 -- you need to basically match the same version of Ruby as Dreamhost
rvm install ruby-1.8.7-p334