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
$(function($) { | |
init_clock(); | |
setInterval(function() { | |
update_clock(); | |
}, 1000); | |
//Inits the clock with date from server | |
function init_clock() { |
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
#------------------------------------------------------------------------------ | |
# Rotinas para verificação de CPF e CNPJ | |
# Linguagem: Ruby | |
# Escrito por: André Camargo < [email protected] > http://blog.boaideia.inf.br | |
# Use, copie, melhore a vontade! Patches são bem-vindos... | |
#------------------------------------------------------------------------------ | |
def check_cpf(cpf=nil) | |
return false if cpf.nil? | |
nulos = %w{12345678909 11111111111 22222222222 33333333333 44444444444 55555555555 66666666666 77777777777 88888888888 99999999999 00000000000} |
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
class Notifier < ActionMailer::Base | |
#emails omitidos propositalemnte para este gist | |
default :from => "xxx@xxxxx", :to => "xxx@xxxxx", | |
:subject => I18n.t("notifier.contact_message.subject") | |
# Subject can be set in your I18n file at config/locales/en.yml | |
# with the following lookup: | |
# | |
# en.notifier.contact_message.subject |
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
class ObjectGroup < ActiveRecord::Base | |
has_and_belongs_to_many :users | |
has_and_belongs_to_many :object_items | |
strip_attributes! | |
validates :description, :presence => true, :uniqueness => true, :allow_blank => true | |
#Search |
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
if yes?("Use mysql?") | |
gem("mysql2") | |
end |
NewerOlder