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
>> [[]] * 5 | |
=> [[], [], [], [], []] | |
>> _.each {|e| puts e.object_id} | |
19154620 | |
19154620 | |
19154620 | |
19154620 | |
19154620 | |
=> [[], [], [], [], []] | |
>> [Array.new] * 5 |
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 count(num) | |
"".tap do |mem| | |
(0..num).each do |element| | |
mem << element.to_s | |
end | |
end | |
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
-content_for :body do | |
%table#front_folders | |
[email protected]_groups_of(5, false).each do |group| | |
%tr | |
-group.each do |f| | |
%td | |
=link_to "", :remote => true, :fhref=>"#{refinery.documents_folder_path(f)}" do | |
.folder{:style=>get_random_grid} | |
%p=f.name |
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.to_prepare do | |
# Load application's model / class decorators | |
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| | |
Rails.configuration.cache_classes ? require(c) : load(c) | |
end | |
# Load application's view overrides | |
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c| | |
Rails.configuration.cache_classes ? require(c) : load(c) | |
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
#!/usr/bin/env ruby | |
class GoodMan | |
require 'base64' | |
attr_accessor :abilities, :age, :message, :skills | |
YODA_VOID = ["YXNrZGZrYWtzZG9vd2VvaWtsc287c2RmaWhpc2p1c2Rma2hobmtraGthbnBv\nZnk5cDItOTM0bGtodHNkZms7bDtoc2RmbA==\n", | |
"bGFzc2xmbHNhZGdra2xhc2R0a2x0a2w7c25hc2xkdXpqcG9hc2RmaG92\n", | |
"cnVieSxqUXVlcnkscGhwLHRkZCxiZGQsc2NydW0sYWdpbGUsc3FsLGxpbnV4\nLGNzcw==\n", |
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
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse |
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
--- no-trailing 2010-12-29 16:36:32.000000000 +0000 | |
+++ updated 2010-12-29 16:38:24.000000000 +0000 | |
@@ -1,4 +1,5 @@ | |
file { "/path/to/filename": | |
owner => "root", | |
- group => "wheel" | |
+ group => "wheel", | |
+ mode => 755 | |
} |
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 ApplicationController | |
def blah | |
@meme.drop! | |
end | |
end | |
class MemesController < ApplicationController |
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
%html | |
%title Starter | |
%body | |
%form{:action => "", :method => "post"} | |
%h4 Choose territory | |
%select{ :name => "territory" } | |
%option AllodsOnline_en | |
%option AllodsOnline_pl | |
%option AllodsOnline_de | |
%option AllodsOnline_fr |
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
%select | |
%option 1 | |
%option 2 |