This file contains hidden or 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
<!-- IE6 Update --> | |
<!-- | |
Instructions: | |
1. Download http://ie6update.com/hosted/ie6update.1.0.0.zip | |
2. Copy ie6update.js to app/webroot/js | |
3. Copy images to app/webroot/img | |
--> | |
<!--[if IE 6]> | |
<script type="text/javascript"> | |
var __noconflict = true; |
This file contains hidden or 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 | |
%html | |
%head | |
%title | |
= javascript_include_tag :defaults | |
= stylesheet_link_tag 'reset.css' | |
= csrf_meta_tag | |
%body | |
#container | |
#header |
This file contains hidden or 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
/* v1.0 | 20080212 */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, font, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, |
This file contains hidden or 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 servidor | |
cd /projetos | |
mkdir foo.git | |
cd foo.git | |
git --bare init | |
# No cliente, apenas uma vez (para "iniciar" o repositório) | |
cd /projetos |
This file contains hidden or 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
# rails3_basic_template.rb | |
# rails new project --skip-test-unit -m https://gist.github.com/992213.txt | |
#OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
# Questions | |
#----------------------------------------------------------------------------------------------- | |
css_framework_option = ask("\r\n\r\nWhat CSS framework do you want to use?\r\n\r\n(1) Bootstrap (default)\r\n(2) Foundation\r\n") | |
css_framework = "bootstrap-sass" if css_framework_option=="1" |
This file contains hidden or 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
if options[:database] !~ /^jdbc/ | |
jdbc_db = case options[:database] | |
when /^postgresql/ | |
"postgres" | |
when /^mysql2/ | |
"mysql" | |
when /^(mysql|sqlite3)/ | |
options[:database] | |
end |
This file contains hidden or 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 'bundler/capistrano' | |
load 'deploy/assets' | |
# ENV | |
#----------------------------------------------------------------------------------------------- | |
set :default_environment, {'PATH' => '~/.rbenv/bin:~/.rbenv/shims:$PATH'} | |
#set :bundle_flags, '--deployment --quiet --binstubs --shebang ruby-local-exec' | |
# APP | |
#----------------------------------------------------------------------------------------------- |
This file contains hidden or 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
bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile |
This file contains hidden or 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
rbenv é um gerenciador de versões ruby, similar ao rvm, porém mais "limpo". | |
A instalação consiste em remover o rvm, instalar o rbenv com plugins e configurar os PATH da vida: | |
1) remover o rvm: rvm implode | |
2) retirar o carregamento do rvm do ~/.bash_profile, a linha com "$HOME/.rvm/scripts/rvm" | |
3) instalar o git: apt-get install git-core | |
4) instalar o rbenv e plugins: curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
5) instalar o ruby mais novo (1.9.3): rbenv install 1.9.3-p0 | |
6) definir o ruby padrão pro sistema: rbenv global 1.9.3-p0 |
This file contains hidden or 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 'spork' | |
#require 'spork/ext/ruby-debug' | |
Spork.prefork do | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' |
OlderNewer