jemnotesversion 2 / featuring mac or see all/search

Aug 3
From here comes the ability to disable Mac OS X screenshot drop-shadows.
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer
and then to re-enable:
defaults delete com.apple.screencapture disable-shadow
killall SystemUIServer
Mar 28
In terminal:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.Boot \
  'Kernel Flags' 'arch=x86_64'
Feb 24
Finally, a decent way of controlling preview on the mac via the apple remote. iRed Lite works well, and finally makes it possible to use the remote for texed presentations.
Dec 12
I spent ages searching for this. I like to have my Sent folder on mac, with Apple Mail, contain both local messages on my computer and remote messages on the server. You get a nice hierarchy where, most of the time, a single “Sent” box holds all sent messages, but click the arrow next to it and you have your local sent messages and your remote sent messages separately.
It sounds simple, but it took me ten minutes to find. Just say in the imap settings to store sent messages on the server, then rename your local sent folder to “Sent” and the two will magically merge. No amount of dragging and dropping will get you there, though.
Dec 7
This page explains how to get symlink following working on the web server built into mac.
Summary:
sudo vim /etc/apache2/users/username.conf
# add FollowSymLinks.
sudo apachectl graceful
Dec 3
You can force an app to start in 32-bit mode using (for example)
arch -i386 irb
Oct 22
When you install xcode, you get FileMerge, which you can open from the terminal with opendiff. It’s a great graphical way of comparing two files—for when diff isn’t quite enough.
Sep 23
Download a file, much like wget, but with curl:
curl -O http://example.com/file.sty
# equivalent to
wget http://example.com/file.sty
This is especially appropriate on mac, because curl comes with mac, unlike wget.
Sep 11
Change the hostname reported by mac, permanently:
sudo scutil --set HostName servername.example.com
May 7
For some reason, Terminal.app appeared to be completely ignoring my request to disable the audible bell. This worked perfectly instead: xset b off.
Mar 3
To create a new group on mac with a specific gid, then add a user, type
dseditgroup -o create -i 499 groupname
dseditgroup -o edit -a username groupname
Nov 18
This page pointed out a bizarre but perfect way of fixing readline on mac. Apparently the GNU license doesn’t play nice for Apple so it doesn’t work by default. I did this:
sudo easy_install ipython
sudo easy_install -f http://ipython.scipy.org/dist/ readline
And suddenly readline worked in ipython on mac.
Sep 2
Leopard irritatingly prevents you from creating an ssh tunnel to another computer and then connecting a samba share to your localhost. Get around this by first creating an alias for your localhost interface:
sudo ifconfig lo0 alias 127.0.0.2 up
Then, forward the ports via ssh, eg with
sudo ssh -N -L 127.0.0.2:139:localhost:139 -L 127.0.0.2:445:localhost:445 user@server.com
Finally, connect using Finder to smb://127.0.0.2/sharename.
Aug 25
Great setup guide for openvpn. Goes well with Tunnelblick.
Aug 16
Infinite labs: excellent little applications for mac, including PlugSuit and Afloat.
Aug 11
From this blog, it seems that to convert from a pdf to an eps the following is required.
gs -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=epswrite -sOutputFile=new.eps old.pdf
There’s also an installer for ipe at the same blog.
Aug 11
find and sed operate slightly differently on a mac. Here’s some code that replaces 4.3 with 4.4 in all Makefiles, recursively.
find . -name 'Makefile' -exec sed -i -e 's/4\.3/4.4/g' {} \;