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
################################ | |
# 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 |
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 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 |
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
# Untar something | |
$ tar xvzf lame-398-2.tar.gz | |
$ tar xzvf git-1.7.1.tar.gz |
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
# Change a MySQL user's password | |
$ mysqladmin -u john -pOLD_PASSWORD password 'NEW_PASSWORD' |
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
###################### | |
# 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 |
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
Listen (on server) : | |
netcat -l -p 4242 | |
Contact (on client) : | |
netcat my-server.com 4242 |
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
# Get the disk usage | |
du -h /var/lib |
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
# 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 |
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 Invoice < ActiveRecord::Base | |
validates :vat_number, :vat => true | |
end |
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 Invoice < ActiveRecord::Base | |
validates :vat_number, :vat => { :country_method => :my_method } | |
end |