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 'find' | |
namespace :db do | |
namespace :fixtures do | |
desc 'Dumps all models into fixtures.' | |
task :dump => :environment do | |
models = [] | |
Find.find(RAILS_ROOT + '/app/models') do |path| | |
unless File.directory?(path) then models << path.match(/(\w+).rb/)[1] 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
1) che differenza c'è tra un metodo definito con def self.nomemetodo end e def nomemetodo end | |
2) Se la variabile pippo è un array e gino è il nome di un metodo nella chiamata gino(*pippo) che significato ha l'asterisco? | |
3) Che fa il method synchronize nella classe Mutex? |
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
# app:sync | |
# Local and production synchronization | |
# - require yaml_db plugin | |
namespace :app | |
namespace :sync do | |
task :all => [:files, :db] | |
task :files do | |
`rsync -azv user@host:'/apps/myawesomeapp/shared/files/' #{Rails.root + 'files'}` |
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 won't work, the second grid will be picked up, leaving an unsightly empty column if there isn't enough content --> | |
<div class="grid article cols-2 page-1"> | |
<div class="container col-1 cols-2" data-sizes="title"></div> | |
<div class="container col-1 cols-2" data-sizes="author"></div> | |
<div class="column"></div> | |
<div class="container col-3 cols-1" data-sizes="thumbnail"></div> | |
<div class="column col-3"></div> | |
</div> |
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
<figure> | |
<div data-sizes="ad-half-600" class="dynamic-ad ad-half-600" height="600"></div> | |
<div data-sizes="ad-half-500" class="dynamic-ad ad-half-500" height="500"></div> | |
<div data-sizes="ad-half-400" class="dynamic-ad ad-half-400" height="400"></div> | |
</figure> |
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
Merb::BootLoader.after_app_loads do | |
class Cookbooks | |
before :authenticate_every, :only => [ :create, :update ] | |
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
class Cookbooks < Application | |
before :authenticate_every | |
# ... | |
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
Exception c0000005, at 1EEE3416 | |
Access violation: attempting to read memory at address 00000004 | |
Native function stack data: 0,3f49c0,20201,801c6,65637845,6f697470,3063206e,30303030 |
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
base="https://raw.github.com/Treesaver/treesaver.walkthrough/master" | |
mkdir -p public | |
mkdir -p public/img | |
for a in 01-down-the-rabbit-hole.html resources.html treesaver-0.9.2.js | |
do | |
curl -o public/$a ${base}/$a | |
done |
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
$curry-line-height: 22px; | |
$curry-plain-grid-outer-width: 280px; | |
$curry-plain-grid-margin: 25px; | |
$curry-plain-h2-font-size: 32px; | |
@import "curry/plain"; | |
.controls { | |
background-color: #222; |
OlderNewer