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
deploy@VilaDeFabiano:~/viladefabiano$ bundle exec sidekiq | |
2014-07-10T16:12:28Z 2270 TID-45f4w INFO: Booting Sidekiq 2.17.7 with redis options {} | |
2014-07-10T16:12:28Z 2270 TID-45f4w INFO: Running in ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] | |
2014-07-10T16:12:28Z 2270 TID-45f4w INFO: See LICENSE and the LGPL-3.0 for licensing details. | |
2014-07-10T16:12:28Z 2270 TID-45f4w INFO: Starting processing, hit Ctrl-C to stop | |
2014-07-10T16:12:28Z 2270 TID-ld0ss Sidekiq::Extensions::DelayedMailer JID-5642f1b11420d41d6a72ae42 INFO: start | |
2014-07-10T16:12:59Z 2270 TID-ld0ss Sidekiq::Extensions::DelayedMailer JID-5642f1b11420d41d6a72ae42 INFO: fail: 30.35 sec | |
2014-07-10T16:12:59Z 2270 TID-ld0ss WARN: {"retry"=>true, "queue"=>"default", "class"=>"Sidekiq::Extensions::DelayedMailer", "args"=>["---\n- !ruby/class 'UnsubscribeMailer'\n- :unsubscribe_confirmation\n- - !ruby/object:Subscriber\n attributes:\n id: 1\n email: [email protected]\n verification: b8d7429816da0d522de0f707bea1fc47\n |
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
# Controller | |
def nome_da_action | |
format.html {redirect_to :back, notice: "Enviado!"} | |
format.js | |
end | |
# Dentro da view do controle, o arivo nome_da_action.js.erb |
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
package br.com.empresa.projeto; | |
public class Main { | |
public static void main(String[] args) { | |
for (int i = 1; i<=3000000; i++){ | |
System.out.println(i); | |
} | |
} | |
} |
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
I had those issues as well. | |
I edited the /etc/network/interfaces file and added a line to the wlanx section: | |
wireless-power off |
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
# Adicione o usuário | |
adduser deploy | |
# de poder ao usuário criado como se fosse root | |
visudo | |
deploy ALL=(ALL:ALL) ALL | |
# Configure o ssh |
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 4; | |
#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
# You may add here your | |
# server { | |
# ... | |
# } | |
# statements for each of your virtual hosts to this file | |
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls |
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
count = Array.new(60) {| i | i +1} # Array de objetos | |
resultado_mega = [1,21,22,27,32,45] | |
i = 0 | |
data_de_inicio = Time.now | |
valor_do_jogo = 2 | |
array_gerado = [] | |
while array_gerado != resultado_mega do | |
array_gerado = count.sample(6).sort! |
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
# Esque esqueminha, ele não precisa digitar a senha atual para alterar o cadastro. | |
def update_with_password(params={}) | |
if params[:password].blank? | |
params.delete(:password) | |
params.delete(:password_confirmation) if params[:password_confirmation].blank? | |
end | |
update_attributes(params) | |
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
source 'https://rubygems.org' | |
# Custom Gems | |
gem 'websocket-rails' | |
gem 'devise' | |
gem 'kaminari' | |
gem 'bootstrap-kaminari-views' # adiciona o thema do bootstrap 3 nas page views | |
gem 'friendly_id', '~> 5.0.0' | |
gem 'devise-async' |