Denis Barushev
a system-wide terminal accessible via a hot-key
is a SIMBL plugin for Terminal.app on Leopard that lets you name your tabs.
Location of the MySQL Socket File in Different Systems
From #mysql_socket_location:
"/tmp/mysql.sock", # default
"/var/run/mysqld/mysqld.sock", # debian/gentoo
"/var/tmp/mysql.sock", # freebsd
"/var/lib/mysql/mysql.sock", # fedora
"/opt/local/lib/mysql/mysql.sock", # fedora
"/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5
"/opt/lampp/var/mysql/mysql.sock" # xampp for linux
Install MySQL and mysql gem on Mac OS X Leopard
Install MySQL server via MacPorts:
sudo port install mysql5 +server
Setup the database:
sudo -u mysql mysql_install_db5
Configure MySQL to start up automatically when OS X boots:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
Install mysql gem:
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
Socket location: /opt/local/var/run/mysql5/mysqld.sock.
Adding Bash Completion for Git on Mac OS X Leopard
Copy this code and paste it into Terminal.
This also should work for any *NIX.
Update
There are the easiest ways to add bash completion for git.
For Mac OS X
Install git via MacPorts:
sudo port install git-core +bash_completion
Then add the following lines at the end of your ~/.profile:
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
For Ubuntu
sudo aptitude install git-completion
For Fedora
sudo smart install bash-completion
Post for visitors from barushev.net
New admins form Netlux ISP have deleted my old site barushev.net. I have no backups but I’m not upset because old site was so outdated. This blog is my primary homepage now.
Passing All Arguments from One JavaScript Function to Another
Function.prototype.apply should do the job:
function debug() {
if (settings.debug) {
console.log.apply(this, arguments);
}
}