Skip to content

Instantly share code, notes, and snippets.

View sandrocarval's full-sized avatar

Sandro Ribeiro sandrocarval

  • Brazil
  • 16:30 (UTC -03:00)
View GitHub Profile
@dforocha
dforocha / gototvs
Created March 28, 2016 17:38
Script criado para simplificar o acesso via ssh nos servidores da TOTVS
#!/bin/bash
#
# FUNCTION:
# Simplificar o acesso via SSH nos servidores da TOTVS
# Antes de acessar o servidor esse script tenta autenticar na VPN da TOTVS por isso atualize a variável VPN_CONNECTION_NAME com o nome da sua conexão de VPN
# AUTHOR:
# Diego Rocha
# CREATED:
# 28-03-2016
# UPDATES:
@haggen
haggen / cpf_cnpj_validators.rb
Last active October 21, 2019 14:40 — forked from gouvermxt/cpf_cnpj_validators.rb
CPF and CNPJ validators Rails 3+ style
# CPF and CNPJ validators Rails 3+ style
# By Arthur Corenzan <[email protected]>
# Based on the work of André Camargo <[email protected]>
#
# Copy this file to your initializers or lib directory, then apply like this:
#
# class Person
# ...
#
# validates :cpf, :cpf => true
@everaldo
everaldo / .irbrc
Last active December 11, 2015 02:59
Instalação do Rbenv
require 'irb/ext/save-history'
#History configuration
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
@statique
statique / installation.sh
Created September 25, 2012 19:18
Setup Ubuntu 12.04 Web Server for Apache Passenger Rails RBEnv Postgres Memcache
# rbenv inspired by https://gist.github.com/1441139
# make sure running as root user
apt-get -y update
apt-get install linux-headers-2.6.32-5-amd64
apt-get -y upgrade
apt-get -y install curl git-core python-software-properties build-essential git-core curl libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev libcurl4-openssl-dev libxslt-dev libxml2-dev
# add-apt-repository
curl -o /usr/sbin/add-apt-repository http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txtchmod o+x /usr/sbin/add-apt-repository