June 5, 2012

Apache permission denied on Mac OSX Lion

I’ve just upgraded to OSX Lion and had some trouble getting Apache to load a vhost. I kept getting a 403 permission denied error, but all my vhosts had the correct permission directives set. Now by default your webserver document root is located in /Library/WebServer/Documents. I don’t really like that for my local machine, I’d rather store web files under my user account. Just tends to make things easier. However…if you’re getting a 403 error, and something like this in your apache error log (/var/log/apache2/error_log): ... Read more

May 24, 2012

Strange linefeed characters appearing on Mac

Had a funny situation today where I was emailed a bash program file, but simply downloading the attachment from gmail (in Chrome) added a linefeed (\r) to the file. This is strange because I never actually opened the file to edit, so I’m not sure what was writing those chars to the file. I’m on a Mac (OSX 10.6.8), so I get the line feed character in general, but just not in this case as the file was never opened. ... Read more

March 14, 2012

Turning voice over off permanently on Max OSX

One of the keyboard shortcuts I often use is command-F6, but I seem to accidentally hit command-F5 on most occasions :( Problem with this is that the god awful “voice over” starts yapping away. Well if you’re like me and know that you’ll pretty much never want this enabled (at least for now!) then here’s how you turn it off permanently. Open up system preferences Click on keyboard Go to the keyboard shortcuts tab Choose universal access from the list on the left Uncheck the “Turn voice over on or off” checkbox Breathe a sigh of relief :)

November 14, 2010

Importing a csv into MySQL using the command line

UPDATE 16th Nov 2010: I had some issues with the import which I noted in the first code example below Today I had to import csv into a single mysql table. The destination table only had 5 columns and the csv was around 22MB (around 400,000 records). The csv also contained more columns that I needed for the import. Sometimes I’ll use a GUI to do this as I usually have one open, but it never ceases to amaze me how much slower GUI tools are compared to the command line. ... Read more

October 4, 2010

Case sensitive development on Mac OS X

At work most of the developers are on Mac OS X but our staging and production environments are Linux based. This means development is case insensitive but stage/production is case sensitive. Although we have development guidelines/standards which dictate file and database naming conventions etc, human error can still occur (in terms of referencing files with a different “case”). We also use a few open source packages where we obviously don’t have control over the naming of files or the references to database tables within those files. ... Read more

August 6, 2008

Getting Inkscape (0.46) to run on Mac Leopard

Inscape is a fantastic open source vector graphics tool which can be a nice alternative to Adobe’s Illustrator. Getting it to run on the Mac took a couple of extra steps though. Firstly the download page advises that you upgrade X11.app to at least XQuartz v2.1.4. This is a large-ish download which forces you to quit all applications as it needs to restart your system after installing. The next problem was that after a restart, Inkscape displays a message saying that the first time it runs it may take a while to load as it needs to caches fonts. ... Read more

July 22, 2008

How do you lock your screen on a Mac?

Call me crazy, but it doesn’t seem like you can “natively” lock your screen on a Mac like you can on Windows. Very odd and annoying as it’s something I do everytime I leave my workstation, I’ve even had to agree to a policy that I will never leave my workstation open as I have secure access to production servers (via ssh). I found some craziness on google where users setup “hot corners” with mouse gestures with the idea that when you “drag your cursor” into that corner the screensaver will be activated requiring a password to get back to the desktop. ... Read more

© Michael Sharman 2017