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
.widget | |
.top | |
.middle | |
%h3 Comparte esta pagina | |
.links | |
%a.facebook{:href=>"#"} | |
%a.twitter{:href=>"#"} | |
%a.email{:href=>"#"} | |
%p.share | |
.bottom |
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
module Zerg | |
class Zergling | |
def attack(victim) | |
puts "Zerg attacks: Hsssssss" | |
victim.die if rand(10) > 6 | |
end | |
def die | |
puts "Zerg dies: Hiiiisssssshhh Haaaashhppp" |
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 Admin::PagesController < InheritedResources::Base | |
layout "admin" | |
before_filter :authenticate_admin! | |
def default_path | |
admin_pages_path | |
end | |
def create |
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
module UnsortedList | |
def sort_ul(list, level = 0) | |
html = "<ul>" | |
list.map do |row| | |
if row[:nivel] =~ /(.*)\..{#{level+1}}/ | |
captured = $1 | |
sequence = list.select {|row| row[:nivel] =~ /^#{captured}\..*$/ } | |
list -= sequence | |
html << sort_ul(sequence,level+1) |
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 'fbgraph' | |
client = FBGraph::Client.new(:client_id => 'client_id',:secret_id =>'secret_id') | |
photos = client.selection.me.photos.until(Time.now.to_s).since(3.days.ago).limit(10).info | |
client.selection.post('id').comments.params(:message => 'Hola').publish! | |
@friends = client.selection.me.friends.info! |
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
#original | |
{% assign page = pages['hi-there'] %} | |
{% if page %} | |
<h2>{{ page.title }} </h2> | |
{{ page.content }} | |
{% endif %} | |
#opcion1 |
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
# config/initializers/encodings.rb | |
Encoding.default_internal, Encoding.default_external = ['utf-8'] * 2 |
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 Refrigeradora | |
def initialize | |
@comida = [] | |
end | |
def comida | |
@comida | |
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
class Refrigeradora | |
def initialize | |
@comida = [] | |
end | |
def comida | |
@comida | |
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
$ curl https://gist.github.com/raw/856296/patch-1.9.2-gc.patch > ~/192-gc.patch | |
$ rvm uninstall 1.9.2 | |
$ rvm install 1.9.2 --patch ~/192-gc.patch |