-
I upgraded to ruby 2.2.2 since I had issues installing certain gems like nokogiri and others on ruby 1.9.3
-
I ran into an issue with polyglot which for some reason tried to require minitest:
polyglot.rb:65:in
require': cannot load such file -- minitest/unit (LoadError)` solution: add minitest to Gemfile -
ran into a ruby 2.2.2 related error:
dyld: Symbol not found: _rb_thread_select
since ruby 2.2 this has been renamed to _rb_thread_select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'yaml' | |
h={} | |
(1..267).each do |x| | |
open("http://www.couchsurfing.org/get_option_values.html?cpaint_function=get_states_auto&cpaint_argument[]=#{x}") do |f| | |
if f.first | |
# anybody knows why it doesnt check if the string is empty before it executes the split ??? | |
# I went through all x which dont work and substitude f.first with | |
# x!=112 and x!=122 and x!=124 and x!= 150 and x!=219 and x!= 240 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:r! echo '<p>PASTE IN</p>' | html2haml <--- Converts pasted code to haml | |
:r! rake routes <---- inserts output of rake routes in current file | |
Commands to explain: | |
- o, O, insert line below/above and change to insert mode | |
- A, go to insert mode at the end of line | |
- D, delete line from cursor till the end, does not jump into insert mode | |
- C, delete line from cursor till the end, jumps into insert mode | |
- f<character>/F<character> find next/previous character | |
- ci" ci' ci} ci) ca) ci) EXAMPLE: how to change what is inside the brackets in 'render_template(:edit)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Supplier < ActiveRecord::Base | |
# delegate name, phone, description and contact if franchise is present | |
%w( name phone description contact ).each do |attribute| | |
define_method(attribute.to_sym) do | |
if self.attributes[attribute].present? | |
self.attributes[attribute] | |
elsif franchise.present? | |
franchise.send(attribute) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file configures the New Relic Agent. New Relic monitors | |
# Ruby, Java, .NET, PHP, and Python applications with deep visibility and low overhead. | |
# For more information, visit www.newrelic.com. | |
# | |
# Generated July 06, 2013 | |
# | |
# This configuration file is custom generated for [email protected] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'i18n/tasks' | |
require 'ruby_cowsay' | |
require 'lolcat' | |
RSpec.describe 'I18n' do | |
let(:i18n) { I18n::Tasks::BaseTask.new } | |
let(:missing_keys) { i18n.missing_keys } | |
let(:cows) { [ | |
"beavis.zen", "bong", "bud-frogs", "bunny", "cheese", "cower", | |
"daemon", "default", "dragon-and-cow", "dragon", "elephant-in-snake", |
I hereby claim:
- I am flov on github.
- I am flowiz (https://keybase.io/flowiz) on keybase.
- I have a public key ASAbLD0sVanmaKH6klM55CHROQvr40Ch2U4P44fqii6X-go
To claim this, I am signing this object: