Skip to content

Instantly share code, notes, and snippets.

View rodrigoflores's full-sized avatar

Rodrigo Flores rodrigoflores

View GitHub Profile
# acceptance_helper.rb
require File.dirname(__FILE__) + "/../spec_helper"
require "steak"
require 'capybara/rails'
RSpec.configuration.include Capybara, :type => :acceptance
# Put your acceptance spec helpers inside /spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f; puts f}
{10-08-29 20:39}[ruby-1.8.7@rails3]Suomi:/Users flores% gem install rails
Successfully installed activesupport-3.0.0
Successfully installed builder-2.1.2
Successfully installed i18n-0.4.1
Successfully installed activemodel-3.0.0
Successfully installed rack-1.2.1
Successfully installed rack-test-0.5.4
Successfully installed rack-mount-0.6.12
Successfully installed tzinfo-0.3.23
Successfully installed abstract-1.0.0
@rodrigoflores
rodrigoflores / aa.rb
Created October 16, 2010 14:23
sasas
sdad
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include <time.h>
#define VMAX 1000
#define NMAX 67.0
int main()
{
int j;
double average,stddev, S[VMAX], Freq[VMAX], Dist[VMAX];
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include <time.h>
#define VMAX 1000
#define NMAX 67.0
int main()
{
int j;
double average,stddev, S[VMAX], Freq[VMAX], Dist[VMAX];
1 3.0
0.95 10.0
0.90 15.0
0.85 8.0
0.80 7.
0.75 6.0
0.70 5.0
0.65 4.0
0.50 3.0
0.45 3.0
#Omniauth initializer
module OmniAuth
module Strategy #:nodoc:
def initialize(app, name, *args)
@app = app
@name = name.to_sym
@options = args.last.is_a?(Hash) ? args.pop : {}
yield self if block_given?
end
end
@rodrigoflores
rodrigoflores / fuck-yeah
Created January 5, 2011 00:22
Momento Fuck-Yeah
deploy@ubuntu:~$ apt-get install ruby-full libmysql-ruby librmagick-ruby build-essential
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
deploy@ubuntu:~$ sudo !!
sudo apt-get install ruby-full libmysql-ruby librmagick-ruby build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
(...)
# >---------------------------[ Install Command ]-----------------------------<
# rails new APP_NAME -m http://railswizard.org/b5e79a66c5839466affe.rb -T -J
# >---------------------------------------------------------------------------<
#
# _____ _ _ __ ___ _
# | __ \ (_) | \ \ / (_) | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_|
@user_info = {"name"=>"Rodrigo Flores", "profile_background_tile"=>false, "profile_sidebar_border_color"=>"C0DEED", "profile_sidebar_fill_color"=>"DDEEF6", "created_at"=>"Sun Nov 21 17:11:16 +0000 2010", "profile_image_url"=>"http://a3.twimg.com/profile_images/392073691/Eu_reasonably_small.jpg", "location"=>nil, "profile_link_color"=>"0084B4", "id_str"=>"218183011", "follow_request_sent"=>false, "contributors_enabled"=>false, "url"=>nil, "favourites_count"=>0, "utc_offset"=>nil, "id"=>3213123, "listed_count"=>0, "profile_use_background_image"=>true, "protected"=>false, "lang"=>"en", "followers_count"=>1, "profile_text_color"=>"333333", "time_zone"=>nil, "geo_enabled"=>false, "notifications"=>false, "description"=>nil, "profile_background_color"=>"C0DEED", "verified"=>false, "profile_background_image_url"=>"http://s.twimg.com/a/1290206336/images/themes/theme1/bg.png", "friends_count"=>0, "statuses_count"=>0, "following"=>false, "screen_name"=>"rlmflores", "show_all_inline_media"=>false}
FakeWeb.register