Wiki - README‎ > ‎Computers‎ > ‎

OSX

disable Bluetooth Assistance (useful when running osx in headless mode or with synergy)
sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekKeyboard '0'
sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekPointingDevice '0'

fix home and end keys!!! [link]
qt creator [link]

delete .DS_Store files [link]
$ find . -name ".DS_Store" -depth -exec rm {} \;       # recursively search from local folder
$ sudo find / -name ".DS_Store" -depth -exec rm {} \;  # recurse from root

unhide user's library [link]
$ chflags nohidden ~/Library/

reset sound driver without rebooting!!! [link]
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' |awk '{print $1}'`
sudo killall coreaudiod

mount ext2/3 formatted usb flash [link]

avoid duplicates in bash history [link]
# add to ~/.bashrc
export HISTCONTROL=ignoredups
# colon-separated list.
# ignorespace: command beginning with space is not added to history
# ignoredups : does not add to history if last entry is same
# ignoreboth : short for ignorespace:ignoredups
# erasedups  : removes same entries in history before adding

join multiple pdfs into one [link]
$ /System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py -o output.pdf in0.pdf in1.pdf
create symlink for convenience :)

mouseposé [link]

ecasound, audio recorder [link]
soundflower, audio remap [link]

colored ls: add following to ~/.bashrc
alias ls='ls -G'

keka, file archiver [link]

switch between windows of same app: meta+` (back-tick)
remap home,end keys [link]

macports [link]
sudo port -v selfupdate
sudo port upgrade outdated

MySQL
$ sudo -u _mysql mysql_install_db5
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h probusto.cs.dartmouth.edu password 'new-password'

Alternatively you can run:
/opt/local/lib/mysql5/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /opt/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug script!


bash prompt [link]
$ echo $PS1
$ PS1="\h:\W \u\$ "
$ PS1="\u@\h:\w$ "

.bashrc vs .bash_profile [link]

better file manager? [link]

Comments