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
| ENV["RAILS_ENV"] = "test" | |
| require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
| require 'shoulda' | |
| require 'webrat' | |
| require 'factory_girl' | |
| require 'test/factories/clearance' | |
| require 'clearance/../../shoulda_macros/clearance' | |
| require 'cucumber/rails/world' | |
| Cucumber::Rails.use_transactional_fixtures | |
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
| # Sean Porter (http://portertech.ca) | |
| # Example unicorn configuration for a decent VPS (Virtual Private Server) | |
| # | |
| # See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete documentation. | |
| # Use at least one worker per core | |
| worker_processes 6 | |
| # Help ensure your application will always spawn in the symlinked "current" directory that Capistrano sets up | |
| working_directory "/var/www/myapp" |
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
| # Sean Porter (http://portertech.ca) | |
| # Example god configuration for Unicorn (Rails) | |
| # Thank you GitHub! | |
| # | |
| # http://unicorn.bogomips.org/SIGNALS.html | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| rails_root = ENV['RAILS_ROOT'] || "/var/www/myapp" | |
| God.watch do |w| |
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
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
| #!/bin/bash | |
| echo "[+] Configure TIME -----" | |
| dpkg-reconfigure tzdata | |
| apt-get install -y ntp | |
| ntpdate ntp.ubuntu.com | |
| echo "[+] Install default libs -----" | |
| apt-get install -y build-essential zlib1g-dev libssl-dev libreadline5-dev |
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
| def wait_for_ajax(timeout=5000) | |
| js_condition = "selenium.browserbot.getCurrentWindow().jQuery.active == 0" | |
| selenium.wait_for_condition(js_condition, timeout) | |
| 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
| # Set up git repository | |
| git :init | |
| # remove all useless public files | |
| run "rmdir tmp/{pids,sessions,sockets,cache}" | |
| run "rm README" | |
| run "rm log/*.log" | |
| run "rm public/index.html" | |
| run "rm public/javascripts/*" | |
| run "rm public/favicon.ico" |
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
| # simple capistrano task for wordpress deploy | |
| # just replace the content to fit your app path and names | |
| # and run cap deploy:setup && cap deploy | |
| # you can also run a cap wordpress:upload_config to copy the local config-sample.php to remote shared folder | |
| # warning: this recipe don't create the database | |
| # APP SETTINGS | |
| set :application, "your_app_name" | |
| set :domain_name , "yourdomain.com.br" |
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
| module PagseguroHelper | |
| def pagseguro_form(order) | |
| content_tag(:form, :id => "pagseguro", :target => 'pagseguro', :method => 'post', :action => 'https://pagseguro.uol.com.br/security/webpagamentos/webpagto.aspx') do | |
| result = "" | |
| result << hidden_field_tag(:email_cobranca, 'seu@email.com') | |
| result << hidden_field_tag(:tipo, 'CP') # Chumbado | |
| result << hidden_field_tag(:moeda, 'BRL') # Chumbado | |
| result << hidden_field_tag(:ref_transacao, order.id) | |
| result << hidden_field_tag(:encoding, 'utf-8') | |
| result << hidden_field_tag(:tipo_frete, 'SD') # Sedex - pro pagseguro calcular o frete automagicamente |
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
| mysql> EXPLAIN SELECT anuncios.codcli, | |
| -> anuncios.razsocial, | |
| -> anuncios.nomefanta, | |
| -> anuncios.irmao, | |
| -> anuncios.endereco, | |
| -> anuncios.num, | |
| -> anuncios.complemento, | |
| -> anuncios.bairro, | |
| -> anuncios.cidade, | |
| -> anuncios.uf, |