Formatting a Disk with FAT32 on OSX Command-Line

If the Disk Utility GUI on OSX doesn’t allow you to format a USB Stick or SD Card with FAT32 the command-line does.

  1. List the available disks with: “diskutil list”
  2. Find the device you want to format eg.: “/dev/disk2” and use this device in the next command.
  3. Format with:sudo diskutil eraseDisk FAT32 DISKNAME MBRFormat /dev/disk2″
Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

The Difference Between 127.0.0.1 and Localhost

Most of the time it doesn’t make a difference what you use, “localhost” or 127.0.0.1. It turns out that it does make a somehow big difference when connecting to a mysql server.

If you use “localhost” most clients will try to “connect” via the socket file that the server puts, if it adheres to the standard, into /tmp, if you use 127.0.0.1 a IP connection is made.

I was made aware of this fact when I tried to connect to the mysql server that comes with XAMP. Its configuration does not adhere to the standard and puts the socket file into /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock on OSX.

The clients that wasn’t aware of this fact obviously failed to connect and threw the error: “Connect Error: SQLSTATE[HY000] [2002] No such file or directory” when a connection attempt was made. Hope who ever has the same problem finds this and spends less time debugging then I did 🙂

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

TextMate Becomes Open Source

My favourite Mac-OS-X text editor just became Open Source. Developer Allan Odgaard announced this in a blog post. The sources of version 2 of TextMate that are still considered Alpha are now available on Github.

The choice of license is GPL 3 for now.  Anything related to the code base, including contributions, can be discussed at the textmate-dev list or #textmate on freenode.net.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone