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
~ % echo $GIT_SSH | |
ssh -F /Users/guille/ssh_config | |
~ % cat ssh_config | |
# Key for guille | |
Host github-guille | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa |
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
SystemStackError | |
stack level too deep | |
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/hash/indifferent_access.rb:32:in `regular_writer' | |
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/hash/indifferent_access.rb:32:in `regular_writer' | |
/usr/local/lib/ruby/gems/1.8/gems/rhosync-2.0.0.beta12/lib/rhosync/indifferent_access.rb:46:in `update' | |
/usr/local/lib/ruby/gems/1.8/gems/rhosync-2.0.0.beta12/lib/rhosync/indifferent_access.rb:46:in `each_pair' | |
/usr/local/lib/ruby/gems/1.8/gems/rhosync-2.0.0.beta12/lib/rhosync/indifferent_access.rb:46:in `update' |
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 class has dubious semantics and we only have it so that | |
# people can write params[:key] instead of params['key'] | |
# and they get the same value for both keys. | |
class HashWithIndifferentAccess < Hash | |
def initialize(constructor = {}) | |
if constructor.is_a?(Hash) | |
super() | |
update(constructor) | |
# 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
def minutes_in_words(timestamp) | |
minutes = (((Time.now - timestamp).abs)/60).round | |
return nil if minutes < 0 | |
case minutes | |
when 0..1 then "less than 1 minute" | |
when 1..2 then "1 minute ago" | |
when 2..59 then "#{minutes} minutes ago" | |
when 60..1440 then "#{minutes/60} hours ago" |
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
#lib/tasks/test.rake | |
namespace :test do | |
desc "Runs all cucumber features and specs" | |
task :all => ['db:migrate', :cucumber, :spec] | |
end |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int numero; | |
cout<<"Digite un numero: "; | |
cin>>numero; | |
cout<<"El numero digitado fue: "<<numero<<endl; | |
//resto del algoritmo aca |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<cronentries> | |
<cron> | |
<url>/</url> | |
<description>Keeps the app responsive</description> | |
<schedule>every 5 minutes</schedule> | |
</cron> | |
</cronentries> |
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
#header { | |
position:relative; | |
width:960px; | |
padding-bottom:25px; | |
} | |
#header p{ | |
text-transform:uppercase; | |
} |
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 "rubygems" | |
require "grit" | |
include Grit | |
def transversal_path(node, level) | |
node.contents.each do |child| | |
if child.class == Grit::Blob | |
puts " "*level*2+" "+child.name | |
else | |
puts " "*level*2+" "+"[#{child.name}]" |
OlderNewer