Writing about mac

2022

Programming screencasts are a popular way to teach programming and demo tools. Typically people will open up their favorite editor and record themselves tapping away. But this has a few problems. A good setup for coding isn't necessarily a good setup for video -- with text too small, a window too …

2013

I'd had success using py2app for building Mac binaries for distribution but wanted to give cx_Freeze a go since it's cross platform - allowing builds for Windows, Linux, and more. Unfortunately, attempting to build using cx_Freeze was resulting in errors:

python
libpyside-python2.7.1.1.dylib: No such file or directory …

On MacOS X 10.5 there is considerable slow-down in the MATLAB editor and other GUI elements. The issue is related to a change in the default Mac Java 2D rendering engine from Quartz2D (10.4) and Sun2D (10.5). This newer rendering engine improves performance for figure drawing, but …

2012

A quick one-liner to recursively search files for a given text string.

Open up a terminal session and enter the following - replacing "foo" with the text to search for.

python
:::sh
find . -exec grep -l "foo" {} \;

You can also limit the search to files with a particular extension (e.g …

2011

Create your own bash pipes to send program output between shells, processes and users.

You may already be familiar with the | command commonly used to send the output of one command into another, e.g. cat /var/log/messages | less. Here we create user-defined pipes to carry output between shells …

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X. It provides a simpler alternative to MacPorts, installing under an isolated non-root prefix, symlinked to /usr/local

method/1490/Screen Shot 2012-04-21 at 17.37.33.png

You do not need to use sudo when using Homebrew as software is installed …

When in a repository directory you can show the name of the currently checked out Git branch in the prompt, making it easier to track where you are (and where you're about to commit).

method/1472/GitBranchName_1.png

The following instructions are written for Mac OS X (Lion) or later, using a terminal with …

Show a warning in the Terminal's prompt when the current working directory is no longer where the shell expects it to be. (e.g. it was deleted or replaced by a new, different directory with the same name by some other app).

method/1471/TerminalPWDChecks.png

Why is this useful? Take the scenario where …

Install and setup the tools necessary for Android development with Eclipse on Mac OS X (Lion)

method/1470/AndroidStuff.jpg

Requirements

Mac running Mac OS X (Lion) (Intel)

Method

Download Eclipse Classic for Mac from the Eclipse download page.

Eclipse Classic is recommended but those who know they need a different version can download …

Established 1980