Skip to content

Instantly share code, notes, and snippets.

View caironoleto's full-sized avatar
🎯
Focusing

Cairo Noleto caironoleto

🎯
Focusing
View GitHub Profile
DROP TABLE ALUNO;
@caironoleto
caironoleto / Replace caps lock to ctrl in Linux.md
Last active June 1, 2018 07:11
Replace caps lock to ctrl in Linux

sudo vim /etc/default/keyboard

And edit XKBOPTIONS="ctrl:nocaps"

Then, reconfigure:

sudo dpkg-reconfigure keyboard-configuration

@caironoleto
caironoleto / apartment_setup_database_test.rake
Last active November 22, 2017 17:53
A faster way to deal with apartment in specs.
# This rake will setup the tenant like rails
# setup the test database.
Rake::Task['db:test:prepare'].enhance do
# Connect in the test database.
Rails.env = 'test'
ActiveRecord::Base.establish_connection('test')
Apartment::Tenant.drop('app') rescue nil
Apartment::Tenant.create('appp')
@caironoleto
caironoleto / pis_pasep_generator.rb
Last active December 16, 2015 09:59
Pis Pasep Generator
#!/bin/ruby
class PisPasepGenerator
INDEX = [3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
def self.generate!
numbers = []
10.times { numbers << rand(10) }
calculated = numbers.each_with_index { |n, i| PisPasepGenerator::INDEX[i] * n }.inject(:+)
$("#form").on("change", "input[id$=my_field]", function() {});
module Capybara
module Node
class Base
def fill_in(locator, options = {})
super(locator, :with => nil)
super
end
end
end
end
# 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"
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:
<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>
class Address
belongs_to :user
validates :zip_code, :presencee => true
end