Skip to content

Category Archives: OSX

Macintosh OSX specific posts

Releasing Maven Artifacts to Central Repository through Sonatype

22-Mar-11

I have released my first Maven artifacts to the Central Repository through Sonatype’s Open Source Nexus Server. You have to jump through some hoops to get everything just right to be able to release to the Sonatype Nexus repository, and I could not find all the information I needed in one place so I will [...]

Get the PID of a running Java process using only BASH tools

22-Jul-10

I need to get the PID of a running Java process, in this case Glassfish 3 to see if it is running before I run some asadmin commands. ps -ax | grep "java -cp /opt/bmam/glassfish" | grep -v "grep" | cut -d " " -f 1 26306

How to force changes to /etc/hosts to take effect in OSX

15-Jul-10

If you make changes to your /etc/hosts file and want the changes to take effect immediately without having to reboot issue the following command at in the Terminal dscacheutil -flushcache

SpiderMonkey in Xcode 3.2.3

28-Jun-10

I am working on a Desktop Application project that will need scripting support, specifically scripting support for people familiar with web development. Even though I have prior experience successfully embedding both Lua and Python in server side applications, I have picked Javascript for this project. Mainly for the low barrier to entry for web developers, [...]

MacFuse on 64bit Snow Leopard 10.6.3

28-May-10

I just spent a good bit of time searching Google on how to get MacFuse working my 64bit Snow Leopard (10.6.3) machine. Here is what I found. MacFuse for Snow Leopard ( 10.6.3 ) You don’t really need MacFusion 2 but it puts a nice interface on MacFuse. It included the SSHFS and FTPFS files [...]

How to determine how many threads you can create from Java

19-May-10

I was getting Out of Memory Error: can’t create native thread errors on a server, and it was definately not running out of memory, so I hacked this little program together to tell me how many threads I should be able to create. 64K is the minimum stack size that Java will allow on an [...]

Getting CouchDB to install from source on OSX 10.6.3 Snow Leopard in 64 bit

06-May-10

The problem with getting CouchDB to install and run correctly in 64 bit mode of OSX 10.6.x is that the ICU dependency has a broken configure script that just won’t compile in 64 bit mode, even with the correct arguments passed in. The solution is to patch up the configure script and force it to [...]

CouchDB launchctl external httpd handlers permissions madness on OSX

30-Apr-10

I had my CouchDB development environment up and running along just fine until I tried to start adding external httpd handlers written Python. I was starting my CouchDB instance with sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist and stopping it with sudo launchctl unload -w /Library/LaunchDaemons/org.apache.couchdb.plist I would get a cryptic Erlang message with ‘OS Process timeout’. [...]

Command line Spotlight – find meets grep

03-Mar-10

Most people don’t know you can do Spotlight searches from the command line. Why remember all the arcane find and grep options and what not when you can let Spotlight do the work for you. The command line interface to Spotlight is called mdfind. It has all the same power as the GUI Spotlight search [...]

Python Remote SSH with Paramiko

10-Feb-10

I am using Paramiko to do some remote ssh work and could not figure out how to change directories and execute a script with the SSHClient.execute_command() function. I finally figured out that .execute_command() is basically a single session, so doing a .execute_command(‘cd scripts’) and then executing the script with another .execute_command() reverts back to your [...]