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 java7 first | |
$ sudo apt-get install openjdk-7-jdk | |
# switch to java7 | |
$ update-java-alternatives -l | |
java-1.6.0-openjdk 1061 /usr/lib/jvm/java-1.6.0-openjdk | |
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64 | |
$ sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 | |
# reference |
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
CREATE USER 'username'@'%' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION; |
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
# 1. Get Apple Font Tool Suite from http://developer.apple.com/fonts/ | |
# 2. Call the following to extract the font config file | |
ftxdumperfuser -t hhea -A d Bold.ttf | |
# 3. Edit the file named Bold.hhea.xml, fiddle with ascender | |
# 4. Call the following to put the config back to the font file | |
ftxdumperfuser -t hhea -A f Bold.ttf |
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
# 1. authorized_keys does’t work. | |
chown user ~/.ssh/authorized_keys | |
chmod go-rwx ~/.ssh/authorized_keys | |
# 2. shorter ssh to frequently used hosts | |
# eg. instead of "ssh -i ~/.ssh/somefile.pub mygoodness@somereallylongname.com", do "ssh daserver" | |
# add following to ~/.ssh/config | |
Host daserver |
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
# 1. Generate a .csr and a .key | |
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr | |
# 2. Submit the csr to SSL Certification Issuing Agent and get back two .crt files. | |
# 3. Tell apache2 where to find those certificates | |
<VirtualHost *:443> | |
... | |
SSLCertificateKeyFile /www/certs/server-key-generated-in-first-step.key | |
SSLCertificateFile /www/certs/ssl-certificate-for-your-domain.crt |
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
## vim /etc/X11/xorg.conf and add | |
Section "ServerFlags" | |
Option "BlankTime" "0" | |
Option "StandbyTime" "0" | |
Option "SuspendTime" "0" | |
Option "OffTime" "0" | |
Option "DontZap" "false" | |
Option "dpms" "false" | |
EndSection |
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 a bunch programs | |
sudo apt-get install ibus ibus-pinyin libm17n-0 m17n-lib-bin m17n-db m17n-contrib | |
# add the following to .xinitrc | |
ibus-daemon -rd & |
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
sudo visudo | |
# add following | |
%admin ALL=(ALL) NOPASSWD:NOPASSWD:ALL |
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
svn propedit svn:ignore <ParentFolderOfTheFilesToBeIgnored> | |
# If svn:ignore property hasn't been set yet | |
svn propset svn:ignore "some_regex" <ParentFolderOfTheFilesToBeIgnored> |
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
# 1. Create Snapshot of Old Volume | |
# 2. Create Volume from Snapshot | |
# 3. Attach to instance | |
# 4. Call | |
sudo resize2fs /dev/xvda1 | |
OlderNewer