This file contains hidden or 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
From http://askubuntu.com/questions/67286/pidgin-doesnt-show-buddy-list: | |
----- | |
This issue still occurs on 12.04. Sometimes, the only way to get it to work is to killall pidgin and use the launcher from the dash. However, I came up with a solution that works every time. | |
Use the following command: | |
gksu gedit /usr/share/applications/pidgin.desktop (or use your favorite editor instead of gedit) | |
Add this to the bottom of the file and save: |
This file contains hidden or 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
# Automagically works out which mirror is the fastest and uses that | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse |
This file contains hidden or 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 openssl req -newkey rsa:2048 -x509 -nodes -days 3560 -out public.crt -keyout private.key |
This file contains hidden or 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
#!/bin/bash | |
BACKUP_PATH="/root/backups/" | |
BACKUP_DIR=$BACKUP_PATH$(date +%F)"/" | |
TARGETS="/root/.bash_history /root/.bashrc /root/.ssh /root/.subversion /etc/httpd/conf /etc/httpd/conf.d /var/www /etc/ssh/sshd_config" | |
# Loop through $TARGETS and rsync them all to $BACKUP_DIR but maintaining their directory paths | |
for DIR in `echo $TARGETS` | |
do | |
mkdir -p $BACKUP_DIR$(dirname ${DIR}) | |
rsync -av $DIR $BACKUP_DIR$(dirname ${DIR}) |
This file contains hidden or 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
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet static | |
address 162.248.161.181 | |
gateway 162.248.161.1 | |
netmask 255.255.255.0 | |
sysctl kernel.hostname=c123456-3467.cloudatcost.com | |
hostname c123456-3467.cloudatcost.com |
This file contains hidden or 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
SELECT table_schema "Database Name", | |
sum( data_length + index_length ) / 1024 / 1024 "Database Size in MB", | |
sum( data_free )/ 1024 / 1024 "Free Space in MB" | |
FROM information_schema.TABLES | |
GROUP BY table_schema; |
This file contains hidden or 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 -u postgres -H /usr/lib/postgresql/9.1/bin/postgres -d 3 -D /var/lib/postgresql/9.1/main/ -c config_file=/etc/postgresql/9.1/main/postgresql.conf |
This file contains hidden or 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 update-alternatives --set editor /usr/bin/vim.basic |
This file contains hidden or 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
sendmail -v [email protected] < test.txt |
This file contains hidden or 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
history | awk '{CMD[$4]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10 |