Skip to content

Instantly share code, notes, and snippets.

View jrod01's full-sized avatar

Jonathan Rodriguez jrod01

  • Washington, DC
View GitHub Profile
@jrod01
jrod01 / gist:3221917
Created August 1, 2012 00:09
Voting info bot
namespace send do
desc "Send info to random user for voting info"
task :search => enviroment do
Twitter.search("Voting Info",:result_type => "recent").results.map do |status|
puts "#{status.from_user}: #{status.text}"
Twitter.search("Polling Place)",:result_type => "recent").results.map do |status|
puts "#{status.from_user}: #{status.text}"
Twitter.search("voting precint)",:result_type => "recent").results.map do |status|
puts "#{status.from_user}: #{status.text}"
lopen(/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/lib/mysql2/mysql2.bundle
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/lib/mysql2.rb:9:in `require'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/lib/mysql2.rb:9:in `<top (required)>'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `e
@jrod01
jrod01 / gist:2863707
Created June 3, 2012 14:21
postgresql trouble
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On Mac OS X with macports:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
@jrod01
jrod01 / HW
Created June 1, 2012 14:53
Assignment
class Table
attr_accessor :color, :seats, :material, :type, :legs
def initialize(inital_hash=nil)
initial_hash.each do |k,v|
instance_variable_set("@#{k}", v)
end if intial_hash
end
def pretty_print
@jrod01
jrod01 / Questions
Created May 31, 2012 22:54
Assignment questions
well first of all
6:48
i dont get the assingtment
6:48
i have the video form renne
6:48
and the code from her gist
6:50
but the code she is writing on sublime text is different from the one in the gist
6:50
<!-- HEADER (start) -->
<img src="http://dvdsbge8erttd.cloudfront.net/wp-content/uploads/rsr_logo-520x100.png" alt="Ready Set Rails">
@jrod01
jrod01 / RoR
Created May 31, 2012 16:13
Jacket instruction
1. Take jacket off the chair
2. Put your left arm in the left arm hole of your jacket
3. Put your right arm inside the right arm hole of jacket
4 Enjoy
@jrod01
jrod01 / RoR
Created May 31, 2012 16:04
Questions
More explanation on strings