Skip to content

Instantly share code, notes, and snippets.

View caironoleto's full-sized avatar
🎯
Focusing

Cairo Noleto caironoleto

🎯
Focusing
View GitHub Profile
@caironoleto
caironoleto / gist:1140306
Created August 11, 2011 18:04 — forked from marcusvmsa/gist:1140301
Tentativa de redirecionamento nginx
server_name .px2.com.br ~^(<subdomain>)\.px2\.com\.br$ ;
location / {
rewrite ^(.*)$ http://$subdomain.pixelquadrado.com.br/$1 permanent;
break;
}
@caironoleto
caironoleto / order.rb
Created November 9, 2011 22:58 — forked from fellix/order.rb
order
class Order
attr_accessor :status
def initialize(adapter = MyWhateverAdapter.new)
@adapter = adapter
end
def pay!
@response = @adapter.pay(self)
end
namespace :assets do
task :precompile, :roles => :web do
run "cd #{release_path} && RAILS_ENV=production bundle exec rake assets:precompile"
end
task :cleanup, :roles => :web do
run "cd #{release_path} && RAILS_ENV=production bundle exec rake assets:clean"
end
end
# Load plugins (only those I whitelist)
Pry.config.should_load_plugins = false
Pry.plugins["doc"].activate!
# Launch Pry with access to the entire Rails stack.
# If you have Pry in your Gemfile, you can pass: ./script/console --irb=pry instead.
# If you don't, you can load it through the lines below :)
rails = File.join Dir.getwd, 'config', 'environment.rb'
if File.exist?(rails) && ENV['SKIP_RAILS'].nil?
class Address
belongs_to :user
validates :zip_code, :presencee => true
end
<div id="content-outer">
<!-- start content -->
<div id="content">
<div id="page-heading"><h1>Editando Usuário <%= @user.id %></h1></div>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
<th rowspan="3" class="sized"><%= image_tag("/images/shared/side_shadowleft.jpg", :width => '20', :height => '300') %></th>
<th class="topleft"></th>
Prezado(a) Usuario(a),
Para melhorar a qualidade dos nossos serviços, estamos excluíndo todas as contas inativas do gmail.
Estamos verificando e confirmando todas contas ativas.
Para manter sua conta gmail ativa clique no link abaixo:
(VALIDAR) [Aqui é o link que o manolo coloca o formulário igual ao do gmail]
Para cancelar definitivamente sua conta gmail clique no link abaixo:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="robbyrussell" (default)
ZSH_THEME="gallois"
module Capybara
module Node
class Base
def fill_in(locator, options = {})
super(locator, :with => nil)
super
end
end
end
end
$("#form").on("change", "input[id$=my_field]", function() {});