function cpfMask(cleanValue) {
return cleanValue.replace(/^(\d{3})(\d{3})(\d{3})(\d{2}).*/, '$1.$2.$3-$4');
}
function cnpjMask(cleanValue) {
return cleanValue.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2}).*/, '$1.$2.$3/$4-$5');
}
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
#!/bin/bash | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Logging function | |
log() { | |
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a /var/log/setup_script.log | |
} |
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
ABNC - Academia Brasileira de Neurocirurgia | |
AGU - Advocacia-Geral da União | |
ANAC - Agência Nacional de Aviação Civil | |
CAER - Clube de Aeronáutica | |
CAU - Conselho de Arquitetura e Urbanismo | |
CBM - Corpo de Bombeiro Militar | |
CFA - Conselho Federal Administração | |
CFB - Conselho Federal de Biblioteconomia | |
CFBIO - Conselho Federal de Biologia | |
CFBM - Conselho Federal de Biomedicina |
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
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<script> | |
$(function() { | |
$(".video").click(function () { | |
var theModal = $(this).data("target"), | |
videoSRC = $(this).attr("data-video"), |
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
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |
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 $uplImageBtn = $('.pui--ev-upload'), | |
$uplContainer = $('#uplProfileImg'), | |
$previewImg = $('.macc--s-pimg img'); | |
$uplImageBtn.click(function() { | |
$uplContainer.trigger('click'); | |
}); | |
$uplContainer.on('change', function() { | |
if (!this.files && !this.files[0]) { |
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
#!/bin/bash | |
set -ex | |
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id | |
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status | |
# Requires application loader to be installed | |
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html | |
# Itunes Connect username & password | |
USER=changeme |
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
#!/bin/sh | |
# place this file at: /etc/hotplug.d/iface/99-login-fon | |
# Configurations | |
FON_USERNAME=email%40domain.com | |
FON_PASSWORD=123456 | |
FON_DELAY_UP=3 | |
COOKIE_JAR_PATH=/tmp/nos-fon-cookie-jar.$INTERFACE | |
. /lib/functions.sh |
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
protect_from_forgery :except => :get_job_resumes #Optional | |
require 'zip' | |
def get_job_resumes | |
@job = Job.find(params[:job_id]) | |
@file = "#{Rails.root}/files/cvs.zip" | |
@applications = Application.get_applicants_all(@job.id) # app context method | |
Zip::ZipOutputStream.open(@file) do |zos| | |
@applications.each do |application| | |
user = application.user |
NewerOlder