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
echo "set noswapfile | |
set term=ansi" >> ~/.vimrc |
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
# Prerequisites | |
sudo apt-get install libaio-dev | |
# Oracle Instant Client | |
"Instant Client Basic" and "Instant Client SDK" packages from Oracle’s site - http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | |
# Jump into /opt/oracle and extract them | |
# You will then end up with a folder such as instant-client_11_2 (the SDK will end up in the same folder). |
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
Link: http://oldwiki.rubyonrails.org/rails/pages/Oracle |
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
rake RAILS_ENV=test db:migrate | |
rake RAILS_ENV=test db:migrate:reset |
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
#Add new user to deploy your application on Ubuntu 10.10 | |
useradd -s /bin/bash -m app-user # add user | |
passwd app-user # change password | |
#in /usr/sbin/visudo Add line below just below 'root ALL=(ALL) ALL': | |
app-user ALL=(ALL) ALL | |
#change to user early created | |
su app-user |
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
# Before it's necessary install a lib | |
sudo apt-get install libpq-dev | |
# And then | |
gem install pg | |
More: http://i.justrealized.com/2010/install-pg-gem-postgresql-ubuntu/ |
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
# Install MySQL | |
sudo apt-get install mysql-server | |
# After set the root password | |
# Configure the file: | |
sudo vi /etc/mysql/my.conf | |
# And add this configuration to bind-address attribute (under [mysqld]) | |
bind-address = 0.0.0.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
# Linux | |
env LD_LIBRARY_PATH=$LD_LIBRARY_PATH ARCHFLAGS="-arch i386" gem install ruby-oci8 | |
# Mac | |
env DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH ARCHFLAGS="-arch x86_64" gem install ruby-oci8 |
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
Gems included by the bundle: | |
* ZenTest (4.5.0) | |
* actionmailer (3.1.0) | |
* actionpack (3.1.0) | |
* activemodel (3.1.0) | |
* activerecord (3.1.0) | |
* activeresource (3.1.0) | |
* activesupport (3.1.0) | |
* ansi (1.3.0) | |
* archive-tar-minitar (0.5.2) |
OlderNewer