- Jim Weirich: The Building Blocks of Modularity – http://goo.gl/g4Nk
- Jim Weirich: SOLID Ruby – http://goo.gl/z3jd
- Sandi Metz: SOLID Object-Oriented Design – http://goo.gl/PDn6T
- Sandi Metz: Less – The Path to Better Design – http://goo.gl/VuTl4
- Demeter is for Encapsulation – http://is.gd/eeyLx
- Opinionated Modular Code – http://is.gd/eeyXm
- Scaling to Hundreds of Millions of Requests – http://vimeo.com/12814529
- Confident Code – http://goo.gl/VFLX
- Destroy All Software Screencasts – https://www.destroyallsoftware.com/screencasts
- Corey Haines: Fast Rails Tests – http://goo.gl/Va2gb
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 GROUP_CONCAT('kill ',id SEPARATOR '; ') AS kill_list | |
FROM INFORMATION_SCHEMA.PROCESSLIST | |
WHERE command='Sleep'; |
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 Lists < App | |
all { List.all } # :get /lists | |
one { List.find(params[:id]) } # :get /lists/:id | |
instance { List.new(params[:list]) } | |
to_update { list.update_attributes(params[:list]) } | |
to_destroy { list.destroy } | |
# If you want to set an action for this resource only. | |
get :search do |
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 is used by Rack-based servers to start the application. | |
# GC_FREQUENCY = 8 | |
# require "unicorn/oob_gc" | |
# GC.disable # Don't run GC during requests | |
# use Unicorn::OobGC, GC_FREQUENCY # Only GC once every GC_FREQUENCY requests | |
# # Unicorn self-process killer | |
require "unicorn/worker_killer" |
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
sudo port -f uninstall installed | |
sudo rm -rf \ | |
/opt/local \ | |
/etc/manpaths.d/macports \ | |
/etc/paths.d/macports \ | |
/Applications/DarwinPorts \ | |
/Applications/MacPorts \ | |
/Library/LaunchDaemons/org.macports.* \ | |
/Library/Receipts/DarwinPorts*.pkg \ |
- Slides com temas, cores e efeitos são muito legais mas, a menos que você saiba exatamente como isso vai ficar no projetor, deixe a “tentação” de lado e faça o simples: slide branco, texto preto
- Para código fonte, independente de conhecer ou não o lugar onde será apresentado, sempre utilize fundo branco, texto em tamanho grande (22 ou maior) e um tema como esse: http://yfrog.com/735mfp
- Se utiliza um Mac, uma forma fácil de copiar código fonte com syntax highlighting para os slides é usar o editor TextMate e um bundle chamado Copy as RTF
- Também no Mac, quando conectado ao projetor, é possível modificar o color profile da saída de vídeo, buscando obter uma reprodução mais fiel ao seu monitor. Para isso, após conectado, acesse System Preferences > Displays > Color (aba na janela de configurações do display secundário) e selecionar um profile que se adeque bem
- Como último recurso, é possível inverter as co
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
# Expand print panel by default | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true | |
# Disable the “Are you sure you want to open this application?” dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
# Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
# Disable press-and-hold for keys in favor of key repeat |
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
# Add all gems installed in the system to the $LOAD_PATH so they can be used in Rails console with Bundler | |
if defined?(::Bundler) | |
current_ruby_version = `rbenv version`.split(" ").first | |
gem_paths = Dir.glob("#{ENV["HOME"]}/.rbenv/versions/#{current_ruby_version}/lib/ruby/gems/**/gems/*/lib") | |
gem_paths.each do |path| | |
$LOAD_PATH << path | |
end | |
end | |
# now you can just normally install these gems ('gem install <gem-name>') into your system and keep your Gemfile listing only your app's dependencies. I use this with wirble, awesome_print and looksee and it works just fine. :) |
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 CardData | |
def initialize(node) | |
@card_data = node | |
end | |
def name | |
@card_data.search("name").text | |
end | |
def image |
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
# Add all gems in the global gemset to the $LOAD_PATH so they can be used in rails3 console with bundler | |
if defined?(::Bundler) | |
$LOAD_PATH.concat Dir.glob("#{ENV['rvm_ruby_global_gems_path']}/gems/*/lib") | |
end |
NewerOlder