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
1. Diskpart (Uma nova janela será aberta, espere até o cursor aparecer) | |
2. List Disk | |
3. Select Disk 1 (substitua o 1 pelo número referente ao seu pendrive) | |
4. Clean | |
5. Create partition primary | |
6. Active | |
7. Format fs=fat32 quick | |
8. Assign | |
9. Exit |
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
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y autoremove | |
sudo apt-get -y clean | |
sudo reboot | |
// Preparando ambiente | |
$ sudo apt-get -y install build-essential vim openssl curl git-core |
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
var products = [ | |
{name: "Product A"} | |
,{name: "Product B", price: 100} | |
,{name: "Product C", price: 200} | |
,{name: "Product D", offerPrice: 100, price: 150} | |
]; | |
function filterPrice(product){ | |
var price = product["offerPrice"] ? product["offerPrice"] : product["price"]; | |
return price ? price : 0; |
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
$ rails s | |
/usr/lib/ruby/gems/2.0.0/gems/clean_logger-0.0.2/lib/clean_logger.rb:6:in `<module:CleanLogger>': uninitialized constant ActiveSupport::Logger (NameError) | |
from /usr/lib/ruby/gems/2.0.0/gems/clean_logger-0.0.2/lib/clean_logger.rb:5:in `<top (required)>' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require' | |
from /usr/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler.rb:132:in `require' |
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
2013-02-27T17:48:24Z 19956 TID--9tjdlm Qe::Sidekiq::Worker JID-aa29bc17e817106ea5074e1d INFO: start | |
2013-02-27T17:48:24Z 19956 TID--9tjdlm Qe::Sidekiq::Worker JID-aa29bc17e817106ea5074e1d INFO: fail: 0.004 sec | |
2013-02-27T17:48:24Z 19956 TID--9tjdlm WARN: {"retry"=>true, "queue"=>"default", "class"=>"Qe::Sidekiq::Worker", "args"=>["MailerWorker", {"mail"=>"new_password_mail", "name"=>"Usuario", "email"=>"[email protected]"}], "jid"=>"aa29bc17e817106ea5074e1d", "error_message"=>"nil is not a symbol", "error_class"=>"TypeError", "failed_at"=>2013-02-27 17:48:24 UTC, "retry_count"=>0} | |
2013-02-27T17:48:24Z 19956 TID--9tjdlm WARN: nil is not a symbol | |
2013-02-27T17:48:24Z 19956 TID--9tjdlm WARN: /var/www/gvar/releases/20130226060346/app/services/mailer_worker.rb:5:in `public_send' | |
/var/www/gvar/releases/20130226060346/app/services/mailer_worker.rb:5:in `perform' | |
/var/www/gvar/shared/bundle/ruby/2.0.0/gems/qe-0.2.1/lib/qe/worker.rb:24:in `block in perform' | |
/var/www/gvar/shared/bundle/ruby/2.0.0/gems/qe-0.2.1/lib/qe/wo |
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
class MailerWorker | |
include Qe::Worker | |
def perform | |
# ChangePasswordMailer.public_send(options[:mail], options).deliver # da erro que nil não pode ser enviado ao public_send | |
ChangePasswordMailer.public_send(options["mail"], options).deliver | |
end | |
end | |
class ChangePasswordMailer < ActionMailer::Base |
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
# Execute | |
# Remove a versão 8.4 do Tcl | |
sudo apt-get remove tk8.4 tcl8.4 | |
# Instala a versão 8.5 | |
sudo apt-get install tk8.5 tcl8.5 | |
# Baixa o .tar do REDIS | |
wget http://download.redis.io/redis-stable.tar.gz |
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
multiple = -> num_one { | |
return -> num_two { | |
num_one * num_two | |
} | |
} | |
# => Proc | |
double = multiple.call 2 | |
# => Proc | |
triple = multiple.call 3 |
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
class Hello | |
def initialize | |
puts "New object instance of Hello class" | |
end | |
end | |
a = Hello.new | |
# => New object instance of Hello class | |
# => #<Hello:0x2368470> |
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
# -*- encoding:utf-8 -*- | |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
helper_method :current_user, :logged_in? | |
private | |
def logged_in? | |
current_user.present? | |
end |