This file contains 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
piper - to configure mouse/logitech | |
lutris - gaming services client (steam/gog/ubisoft/etc) | |
flameshot - to screenshot and annotate | |
handbrake | |
shotcut |
This file contains 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 parseDate = function(date) { | |
var year = 2000 + parseInt($('.period .filter').text().match(/^.*(\d{2})$/)[1]) | |
date = date | |
.replace('Fev', 'Feb') | |
.replace('Abr', 'Apr') | |
.replace('Mai', 'May') | |
.replace('Ago', 'Aug') | |
.replace('Set', 'Sep') | |
.replace('Out', 'Oct') |
This file contains 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
RSpec.configure do |config| | |
# If you're not using ActiveRecord, or you'd prefer not to run each of your | |
# examples within a transaction, remove the following line or assign false | |
# instead of true. | |
config.before :suite do | |
DatabaseCleaner.clean_with :truncation | |
end | |
config.before :each do | |
if example.metadata[:js] || example.metadata[:truncation] |
This file contains 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
pt-BR: | |
simple_form: | |
"yes": 'Sim' | |
"no": 'Não' | |
required: | |
text: 'obrigatório' | |
mark: '*' | |
# You can uncomment the line below if you need to overwrite the whole required html. | |
# When using html, text and mark won't be used. | |
# html: '<abbr title="required">*</abbr>' |
This file contains 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
pt-BR: | |
errors: | |
messages: | |
carrierwave_processing_error: "Não foi possível redimensionar imagem." | |
carrierwave_integrity_error: "Não é uma imagem." | |
carrierwave_download_error: "Não foi possível fazer download da imagem." | |
extension_white_list_error: "O formato %{extension} não é permitido. Formatos suportados: %{allowed_types}" | |
extension_black_list_error: "O formato %{extension} não é permitido. Formatos proibidos: %{prohibited_types}" |
This file contains 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
pt-BR: | |
active_admin: | |
dashboard: "Painel Administrativo" | |
dashboard_welcome: | |
welcome: "Bem vindo ao Active Admin. Esta é a página de painéis padrão." | |
call_to_action: "Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'" | |
view: "Visualizar" | |
edit: "Editar" | |
delete: "Remover" | |
delete_confirmation: "Você tem certeza que deseja remover este item?" |
This file contains 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. | |
Download the excel file with the current data for | |
= @table | |
= link_to 'here', '#' |
This file contains 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
# === Sem o inverse_of | |
c = Customer.first | |
o = c.orders.first | |
c.first_name == o.customer.first_name # => true | |
c.first_name = 'Manny' | |
c.first_name == o.customer.first_name # => false | |
# === Com o inverse_of | |
class Customer < ActiveRecord::Base | |
has_many :orders, inverse_of: :customer |
This file contains 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.rb | |
# Fixes the error that prevents resque workers from dying, caused by NewRelic (https://github.com/defunkt/resque/issues/578#issuecomment-12509400). | |
# FIXME: When newrelic_rpm >= 3.5.6.48 is released, remove this hotfix and update the gem. | |
task :set_newrelic_false, :roles => [:resque_worker, :resque_scheduler] do | |
default_run_options[:env] = { 'NEWRELIC_ENABLE' => false } | |
end | |
before('resque:start', 'set_newrelic_false') | |
before('resque:scheduler:start', 'set_newrelic_false') |
This file contains 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
# *** RVM CONFIGURATION *** | |
set :rvm_ruby_string, "ree-1.8.7-2012.02@#####" | |
set :rvm_type, :system | |
before 'deploy:setup', 'rvm:install_rvm' # install RVM | |
before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or: | |
require 'rvm/capistrano' | |
require "bundler/capistrano" | |
set :application, "#######" |
NewerOlder