Posts with the category Mac OS X 10.6 Snow Leopard
Running this command will show you if there is something preventing your computer to go to go to standby automatically:
pmset -g assertions
- Mac OS X: Why your Mac might not sleep or stay in sleep mode: http://support.apple.com/kb/HT1776
brew install haskell-platform cabal update cabal install pandoc
Alternatively use the way described in its installation instructions.
I do not particulary like SVN but sometimes I have to use it. The diff output on the Mac OS X command line usually is not colored which is annoying. The solution is to tell SVN it should use
colordiff instead. You can easily install colordiff using homebrew:
Picasa-Downloader – A simple Python script to get the normal size images
pip install BeautifulSoup cd ~/Downloads wget https://raw.github.com/anoopjt/Picasa-Downloader/master/picasa_downloader.py
Pycasa – capable of downloading full size images
This open source software includes a GUI. It relies on PyGTK and it is therefore difficult to get it to work with Mac OS...
IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:
- Powerful interactive Python shells (terminal- and Qt-based).
- Support for interactive data visualization and use of GUI toolkits.
- Flexible, embeddable interpreters to load into your own projects.
- Tools for high level...
MacFSEvents is an up-to-date solution to monitor directories for changes on Mac OS X when using the scripting language Python. It is a binding to FSEvents, Mac OS X's filesystem monitoring framework.
pip install macfsevents
from fsevents import Observer, Stream <span...
Installation of the pre-built binaries for OS X
This is a good way if you have an up-to-date Python installation on your computer and
pip installed. It takes, however, some time (~ 20 mins for me) to install as it...
- My favorite: Advanced Serial Port Monitor v4.1.5 2011-03-28.
Works with Windows 7, somewhat limited in the free edition but good for me.
- 232Analyzer has a free edition: http://www.232analyzer.com/232default.htm.
- Advanced Serial Port Monitor v3.00
I don't know if this works with newer Windows versions.
- SAL232 - RS-232...
Mac OS X
- CoolTerm (Mac and Win): http://freeware.the-meiers.org/
- ZTerm: http://homepage.mac.com/dalverson/zterm/
- ZOC (costs money): http://www.emtec.com/zoc/features.html
- goSerial: http://www.furrysoft.de/?page=goserial
- SyncTERM: http://syncterm.bbsdev.net/
- Using the terminal app
screen /dev/tty.usbserial 9600
- MacWise (costs money): http://www.macwise.com/
sudo apt-get install minicom
minicom -o -s
How it works:
-odo not try to initialize a modem first
If you want to adjust the spindown time of the hard disk drives of your Mac OS X based computer, you can simply run the following command (which will set the spindown from the default 10 minutes to 30 minutes for all HDDs on your system):
pmset -a spindown...
Sometimes you have to use the middle mouse button, sometimes it's just convenient to do so. Either way, if you want to use it on a virtualised Linux machine on a Parallels 6 (or any other virtualisation software) you can't out-of-the box on a MacBook Pro as the touch pad...
brew install libusb
Usage in Xcode
Using libusb in an Xcode project is easy:
- Project Settings → Your Target → Build Phases → Link Binary with Libraries and add
- Project Settings → The Project → Header Search...
Fuse4X is a port of FUSE - The Filesystem in Userspace to Mac OS X and allows you to mount all different kinds of remote / local filesystems on you Mac computer. A very popular 'filesystem' is sshfs, which allows you to mount a directory of a remote...
You can get the latest driver for PL2303 based USB to serial adapters from the Prolific download page: http://www.prolific.com.tw/US/supportindex.aspx?id=7 (Login as GUEST / GUEST).
More information about the use of a PL-2303 chip based USB-RS232 adapter can be found on http://www.planet-rcs.de/article/mac_serial_port/....
- Use the Freeware ThumbsUp (not from context menu but via drag and drop)
- or create your own services menu.
The AppleScript Editor shipped with Mac OS X (or XCode...) PreFab UI Browser http://pfiddlesoft.com/uibrowser/ Script Debugger 4.5 http://www.latenightsw.com Smile http://www.satimage.fr/software/en/smile/index.html
Run a Terminal Command
set hostname to "www.apple.com" do shell script "ping -c1 " & hostname
Praveen Gollakota shed light on Installing Python 2.7, easy_install, pip, virtualenv and virtualenvwrapper on Mac OS X. He gives you all the information you need if you want to use an up-to-date Python on Mac OS X! Thx!
Alternative way of installing python using homebrew:
brew install python
update 2015-09-08: this is outdated, please refer to my new blog post instead.
Install the Google Data Library (you should consider installing it in an isolated virtualenv environment):
cd ~/Downloads curl -C - -O http://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz tar -xf gdata-2.0.14.tar.gz cd gdata-2.0.14 python setup.py install
Now you are ready to test the example...
Mount SSH filesystems
My personal favorite: Fuse4X
Use with this distribution of SSHFS: https://github.com/fuse4x/sshfs
See my dedicated blog post on SSHFS on Mac OS X 10.6.8 with Fuse4X!
Deprecated Option: MacFUSE sshfs using command line
First install MacFUSE.
Then get the sshfs binaries:
cd ~/Downloads svn co http://macfuse.googlecode.com/svn/trunk/filesystems/sshfs/binary sshfs-binaries
The privacy extensions as defined in RFC4941 make your device change its IP every now and then.
Privacy addresses are not enabled by default. Their generation is activated via the
use_tempaddr that can be set to one of the following values:
0don't use privacy extensions.
1generate privacy addresses
Hurricane Electric provides free IPv6 tunnels via the 6in4 protocol on the website tunnelbroker.net. After signing up, one can create up to 5 tunnels. When settings up a standard tunnel, one has to provide one's endpoint IPv4 address which may change from time to time (moving around or 24-hour...
cd ~/Downloads git clone git://github.com/maxcutler/python-wordpress-xmlrpc.git cd python-wordpress-xmlrpc python setup.py install
I got the following error message when trying to open a network interface for capture using Wireshark on Mac OS X (Wireshark 1.5.1 Intel 64 beta and 1.4.6 Intel 64 show this behaviour):
There are no interfaces on which a capture can be done.
To solve the problem open a Terminal and...
To disable the the Firefox cache on the disk (SSD) and move it to your RAM, follow these steps:
- Go to
- as well as
You can check what the cache is doing by going to
noatime option on the root filesystem
Via the System Preferences: Network pane
- Go to System Preferences → Network.
- Click on Ethernet (or AirPort)
- Click on the Configuration Wheel → Duplicate Service...
You can now configure each instance with different settings, and you're done.
On the Terminal
If you just need to quickly assign an IP/subnet alias to an interface, you can do...
- Rename the shellscript from
.command, then associate it with Terminal.app
- Use Platypus to create a .app from the shellscript
This is a great tool to turn scripts (shell, perl, python) into an OS X application. Many features supported!
I chose it because it seems to be more actively developed.
As explained on https://github.com/mxcl/homebrew/wiki/installation I installed Homebrew like this:
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
I had XCode already installed, but If you don't, you have to install it before following the next steps (in order to have...
- Great overview (German): http://wiki.python.de/Python-Programmieren%20mit%20Vim
- Python setting tips: http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/
- latest (and elaborate) response on http://stackoverflow.com/questions/144201/has-anyone-found-a-good-set-of-python-plugins-for-vim-specifically-module-comp/3113907#3113907
I experienced a problem with my Apple Magic Mouse when I wanted to use it with my new MacBook Pro (early 2011, Core i5): The movements became "blurry", jittery. I have an external display connected via Mini Displayport but this does not seem to affect the problem. But when I...
The hostname can be changed with
scutil on Mac OS X.
scutil provides a command line interface to the “dynamic store” data maintained by configd. [from the scutil manual].
To set a new hostname run:
sudo scutil --set HostName newhostname[.domain]
Synthesis SyncML-Client http://synthesis.ch/prod_client.php
Conduit, an open source Gnome program:
Works well! I use it on Ubuntu Linux 10.10 maverick.
Backup Goo, Works on Mac, Win, Linux; 14 days trial version, 10 EUR afterwards:
Cloud based solution (using Amazon S3):
If you want to know who is behind an IP address (or a domain name) you should use the command line tool
whois, which Mac OS X, most Linux and BSD distributions ship. For example, if you want to get information on the IP 10.8.0.1:
And the output...
Little Snitch is the classic user interface for the Mac OS X firewall. But it has a drawback: it costs ~30 EUR for a single licence.
The three notable alternatives are:
- Hands Off! http://www.metakine.com/products/handsoff/ Costs 38.75 EUR
There are also some open source tools:
An interface to the new...
- AntiRSI. Donationware.
- MacBreakZ. Full version costs 24.95 EUR.
- Time Out Free. It can be found on the Mac App Store. Version 2 Pro (soon to be released) will not be for free.
OCR for Windows
- PenPower Chinese OCR (Chinese product website: http://www.pen-power.com/chinese/chineseocr.html)
OCR for Mac OS
- Readiris Pro Asian (English product website: http://www.irislink.com/c2-1685-189/Readiris-12-for-Mac.aspx)
- IRISPen Express Asian (English product website: http://www.irislink.com/c2-1099-189/IRISPen-Express-Asian---Pen-scanner-for-Asian-text-recognition-.aspx)
- Tesseract 3.0 (free, open source) (install via Homebrew formula tesseract.rb and install the Chinese training data file
purge command clears the inactive memory on Mac OS X. Simply run the command with no parameters:
Go to System → Preferences → Keyboard Shortcuts and set the shortcut for
Hide all normal windows and set focus to desktop to something sane like
Alt + D
update 2011-07-13: This happened again when I used Ubuntu 11.04 inside a NX session on a Mac OS X host computer. :(
How to make vim more comfortable (the version shipped with Mac OS X 10.6):
cd /usr/share/vim sudo vim vimrc
set ai " auto indenting set history=100 ...
OS X has a good feature built in: the dns resolver. It allows you to specify different DNS servers for different domains. After creating the
/etc/resolver directory, you can create a
/etc/resolver/erdelynet.com file with
nameserver 192.168.25.10 in it to redirect DNS requests for this domain to that specific nameserver.
Correcting EXIF Date of Images
This is my tool of choice! It does a great job!!!
If your timestamps are wrong by 5 years, 10 months, 2 days, 10 hours and 48 minutes, put all of the images in the same directory ("DIR") and run exiftool:
Pair the device with Mac OS X and open BT747 then connect to the manually entered: /dev/tty.iBT-GPS-SPPSlave
remapping the Command and Option key
If you use a non-Apple external USB keyboard you will notice that the Windows key represents the ⌘ Command Key and the Alt key represents the ⌥ Option key. To invert this key mapping, open the System Preferences → Keyboard → Modifier Keys → Unknown...
also check http://dl.dropbox.com/u/34351/NSConferenceNotes.txt (or google it, it's also gisted on github) for more ideas
- otx http://otx.osxninja.com/ (maybe also http://github.com/karstenBriksoft/Mach-O-Scope)
- on a linux machine: objdump
- gcc: compile C code with
-Sflag to output assembler
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
use the following AppleScript and save it as
(* Reload Preview Document 1.0 By Trevor Harmon <firstname.lastname@example.org> Based in part on the "Checking Accessibility Status" script by Apple. http://www.apple.com/applescript/uiscripting/01.html *) on UIscript_check() -- get the <span...
If you ever wanted to open PDF, JPEG, PNG files etc.
#!/bin/sh # A simple bash script that uses Applescript to # open multiple files in Preview. For example: # "preview hello.png world.gif *.jpg" if [ -z "$*" ]; then ...
We as Mac users know that the space bar reveals "Quick Look" the fast preview for folders and files on Mac OS X. But how can you have a "quick look" at a file when using the terminal? The anser is the following command:
qlmanage -p the.file.in.question
#PATH=$PATH:$HOME/bin:/usr/local/bin alias firefox="open -a Firefox" alias l="ls -l" alias la="ls -la"
and reload the .bashrc file using
. ~/.bashrc or
You might want to add the following line to your
~/.bash_profile in order to get the
~/.bashrc loaded at the start of an interactive bash session:
Create a terminal shortcut for Firefox:
sudo ln -s /Applications/Firefox.app/Contents/MacOS/firefox-bin /usr/local/bin/firefox
or simply use the
open tool with the application option
open -a Firefox http://google.de
Mac OS X 10.6 ships with Apache as well as PHP5. This blog post describes how to activate it.
To run Apache: Enable Web Sharing in the System Preferences → Sharing.
Websites are stored in
To activate PHP:
uncomment a line in
LoadModule php5_module ...
To create an ssh shortcut, add the following text (adopted to your setup) to
# You can add multiple blocks like this to your .ssh/config Host rudolf Hostname rudolf-web.net Port 22 User rudolf Protocol 2 Compression yes ServerAliveInterval 15 ForwardX11 no #LocalForward 20001 18.104.22.168:80
To connect to that host via ssh you can now simply type the following...
Assume we have a file on Mac OS X on a HFS or HFS+ file system named
If you want to see the content of the resource fork for the file do:
If you want to delete its resource fork:
cat /dev/null >XX/..namedfork/rsrc
If you want to see hidden system files (that have a dot at the beginning on UNIX systems) run:
defaults write com.apple.finder AppleShowAllFiles -bool true
use false to revert the change....
You can do this on the terminal via the full UNIX device descriptor:
hdiutil eject /dev/disk1s1
you might want to add
-force to the command to enforce the operation.
The context menu actions can be found in the folder
~/Library/Contextual Menu Items
Update 2011-12-20: As there is no update of iRedLite for OS X 10.7 Lion so far. You can still use it but the bindings for Preview.app are broken. A workaround is to set the buttons to actions such as Current App → Cursors Movement → Right to go one slide...
Mac OS X TimeMachine is a great system to simplify backup and recovery on the desktop. But it failes if you have to backup your data after each change and not just every hour. So what you need sometimes is a triggered backup: have a look at c't TriggerBackup....
To list all ports where server software listens to on a computer running Mac OS X, run this in the terminal:
sudo lsof -i -P | grep -i "listen"
To convert the file input.flac (saved using the FLAC) to the file output.m4a (ALAC format) you can use this Terminal command:
ffmpeg -i "input.flac" -acodec alac "output.m4a" -map_meta_data input.flac:output.m4a
This needs the ffmpegX distribution for Mac OS X, which seems, however,...
Burning an ISO Image from Terminal
hdiutil burn image.iso
Creating an ISO Image from a Folder
hdiutil makehybrid -o ~/Desktop/[outfile] ~/Desktop/[source]
[source] can be a folder or a disk image.
Creating an ISO Image from a CD
Determine the device that is you CD/DVD drive:
Umount the disk:
Terminal helpers (command line tools):
mdfind: Search Spotlight metadata indices.
mdimport: Force Spotlight to import metadata for a specific directory.
mdls: List the metadata attributes of a specific file.
mdutil: A utility for managing Spotlight indices.
To erase and rebuild the index on the root partition
Temporarily disable Spotlight indexing is especially useful when connecting a large external HDD for the first time to copy/move/access some files as the Sportlight scanning slows down the drive access a lot.
sudo mdutil -a -i off
to turn it back on:
sudo mdutil -a -i on
If you want to control iTunes by bumping on your MacBook then follow this advice:
Get amstracker and bumptunes.py and unpack them somewhere. Open a Terminal in that directory and run:
./amstracker -u 0.1 -s | python bumptunes.py
To change the login screen wallpaper on Mac OS X you can use the some commands on the terminal. They work on Leopard 10.5 and Snow Leopard 10.6:
cd /System/Library/CoreServices sudo mv DefaultDesktop.jpg DefaultDesktop_org.jpg sudo cp /path/of/image.jpg DefaultDesktop.jpg
Sites that list good mac software:
Including paid applications:
My favorite text editor on Mac OS X is MacVim as I love both: vim and my Mac.
In order to use it more productively, copy the launcher
mvim from the MacVim bundle to an executable directory:
Apple List of keyboard shortcuts: http://support.apple.com/kb/HT1343
for Snow Leopard: Snow Leopard Tipps (It's the site of the author of the Growl based Version of TriggerBackup.)
important darwin commands
Original TI-89 packaging in French (see the full image here ):
Programming SDK for Windows
PedroM - An Alternative Operating System
There is a free OS: PedroM.
sudo aptitude install tiemu-skinedit tiemu
OS rom file download: TI-89 Titanium...
To open a Mac OS X installer package (.pkg) you can right click on the bundle and select
Show Package Contents. Inside you will find a packed file in the .zip or .gz format. When you unpack this file you get a pax file and you can unpack that too....
For convenience I want a link
shortcut to my folder
/home/philipp/something/deeply/stapled in the root folder
/ in order to have faster access to it (on the terminal):
sudo ln -s /home/philipp/something/deeply/stapled /shortcut
Now I can get to
/home/philipp/something/deeply/stapled using the short form