Aug 22

Edit Remote Files in TextMate Tabs

Tag: mac, os x, tricksadmin @ 4:48 pm

If you want to edit remote files in TextMate (say with Transmit over FTP), opening them up usually means individual windows.  No more.  Follow these simple instructions and you can have a project with tabs whenever you edit a remote file.


Jun 29

Delete non-empty directory in unix/linux/mac os x

Tag: linux, os xadmin @ 3:13 pm

Just type

rm -rf directory_name


Jun 22

Textmate as the ultimate editor

Tag: latex, mac, os x, php, stataadmin @ 4:10 pm

With dozens of “bundles” that allow for application-specific editing, the Mac text editor TextMate is a great tool for the researcher. I posted four screenshots below for Stata, LaTeX, Matlab and PHP. The most powerful is PHP as there is a default bundle that lets you run the script directly from the file. With a little work (install TeX on your Mac), you can easily compile and view your LaTeX files. The quick command(e.g. “begin + “tab”) make editing a breeze. What I like most is the syntax highlighting that it brings to editing .m and .do files.  Moreover, you can create “projects” that let you easily handle multiple files.

Textmate with Stata

Textmate and Stata

Textmate with LaTeX

Textmate and Latex

Textmate with PHP

Textmate and PHP

Textmate with Matlab

Textmate and Matlab


Jun 11

Show hidden files in Mac OS X

Tag: mac, os xadmin @ 9:16 am

Start terminal and run:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

When you are done (be careful!) revert back with:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder


Jun 03

Creating htaccess files in Mac OS X

Tag: mac, os xadmin @ 1:27 pm

(Note: this has little to do with data, but it did make this blog function better) As Mac OS X is unix based, htaccess files are recognized as system files when they are created/edited. This differs from creating them in Windows, which sees them simply as a text file. If you create a .htaccess file in OS X (note the period), the file will disappear once saved. You could kill Finder and view all files, but there is an easier way to get that .htaccess file to where you want to get it:

1. Create the file as usual
2. Save as ‘htaccess’ without a file extension or period.
3. Upload the file to the server.
4. Once uploaded, rename the file on the server to ‘.htaccess’