Archive for the ‘Macintosh’ Category

Convert CRLF to LF line endings recursively

Friday, January 20th, 2012

dos2unix utility converts a file from dos to unix format, i.e replaces CRLF line endings to LF line endings.

This utility can be installed on any *nix environment using apt, yum, ports, etc.

To install on Mac:

sudo port -d selfupdate
sudo port install dos2unix

To install on Debian/Ubuntu/Mint:

apt-get install dos2unix

To run this utility recursively in a directory (excluding subdirectories) cd to the directory and then run following command:

find . -name *.* -exec dos2unix {} ;

To run this utility recursively (including subdirectories) cd to the directory and then run following command:

for file in `find . -type f`; do dos2unix $file $file; done

Convert Outlook PST to MBOX in Snow Leopard

Sunday, June 6th, 2010

Here are the steps that I tried successfully on Snow Leopard:

  1. Download libpst source from http://www.five-ten-sg.com/libpst/packages/. Extract it in ~/Downloads directory.
  2. Download boost source from http://sourceforge.net/projects/boost/files/boost/. (will be downloaded to ~/Downloads directory by default)
  3. Open Terminal and run following commands: (replace X_XX_X and x.x.xx with the version of boost and libpst that you’ve downloaded):
    $su - root
    #cd /usr/local
    #tar --bzip2 -xf ~/Downloads/boost_X_XX_X.tar.bz2
    #cd  /usr/local/boost_X_XX_X
    #./bootstrap.sh --prefix=/usr/local/
    #./bjam install
    #cd  ~/Downloads/libpst-x.x.xx
    #make install
  4. Run this command on terminal – in the directory you want the MBOX created
  5. $readpst -r /path/pstfile.pst

For installing Weblogic 10.3 on Snow Leopard

Saturday, June 5th, 2010

Hack to validate JVM while installing Weblogic 10.3 on Snow Leopard:

cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/sudo mkdir jre
cd jresudo ln -s ../lib libsudo ln -s ../bin bin

Install MySQL gem on 64 bit Snow Leopard

Wednesday, March 3rd, 2010

Install 64 bit MySQL then run following commands in terminal:

export ARCHFLAGS="-arch i386 -arch x86_64"</pre>
gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config


Snow Leopard – Eclipse CDT – Launch Failed. Binary Not Found

Thursday, November 5th, 2009

Go to project Properties, C/C++ Build, Settings then click on Miscellaneous under Mac OS X C++ Linker and put “-arch i386″ in the Linker Flag Box and then Miscellaneous under gcc c++ compiler and put the same: “-arch i386″ in the Other Flags box.

I can now Compile and run my programs in Eclipse again :).

  • © 2004-2015 Special Work & Technology Limited