Skip to content

Instantly share code, notes, and snippets.

View aurels's full-sized avatar

Aurélien Malisart aurels

View GitHub Profile
################################
# Run ActiveRecord with Oracle #
################################
- télécharger chez Oracle 'Instant Client Package - Basic"
- décompresser dans /opt/oracle
- télécharger chez Oracle "Instant Client Package - SDK"
- décompresser dans /opt/oracle
- faire le lien symbolique suivant "ln -s libclntsh.so.11.1 libclntsh.so" dans /opt/oracle
- Créer une variable d'environnement ORACLE_HOME pointant vers /opt/oracle
# Install Git on ubuntu
Download the latest source and untar it.
$ cd ~/src/git-x
$ apt-get build-dep git-core -y
$ ./configure
$ make
$ sudo make install
# Untar something
$ tar xvzf lame-398-2.tar.gz
$ tar xzvf git-1.7.1.tar.gz
# Change a MySQL user's password
$ mysqladmin -u john -pOLD_PASSWORD password 'NEW_PASSWORD'
######################
# Fix iMovie crashes #
######################
Remove this file :
/System/Library/PrivateFrameworks/GraphicsAppSupport.framework/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer
Source : http://discussions.apple.com/thread.jspa?threadID=2311140&tstart=0
Listen (on server) :
netcat -l -p 4242
Contact (on client) :
netcat my-server.com 4242
# Get the disk usage
du -h /var/lib
# Ubuntu fixed IP
/etc/network/interfaces :
auto eth0
iface eth0 inet static
address 192.168.0.142
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
class Invoice < ActiveRecord::Base
validates :vat_number, :vat => true
end
class Invoice < ActiveRecord::Base
validates :vat_number, :vat => { :country_method => :my_method }
end