Tag Archives: tips

AppCleaner Tip

AppCleaner is one of those apps you never delete. It helps you clean up other apps. Its pretty good at what it does. It usually goes in and finds the app’s downloaded installer as well as residual property files.

The only thing I’ve noticed is that if you select more than 1 app to delete it’ll get a bit confused and select a few unrelated items as well.

So my tip is to delete an app at a time. ;)

Side note: Why delete Google Drive? Well it and another bunch of non essential apps were eating up my memory and boot up time. So I dumped them all and optimized things a bit.

Show/ Hide Hidden Files In Mac Finder

The first thing you notice in Mac Finder is there is no way to show hidden files. In Windows Explorer or Gnome this is in the menus. On mac you need to set a environment variable called “com.apple.finder AppleShowAllFiles” to toggle the state of hidden files.

I manually changed this a couple of times, but its annoying to do all the time. So I thought of adding it to a bash script to make things easier.


SHOW_FILES=`defaults read com.apple.finder AppleShowAllFiles`

if [ $SHOW_FILES = "FALSE" ]; then
	defaults write com.apple.finder AppleShowAllFiles TRUE
	defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Mac OS X – Show / Hide Hidden Files in Finder

SQLite Vacuum on F-Spot

I heard on FLOSS Weekly 26: SQLite the other day about the vacuum command in SQLite and how it rebuilds the database and makes Apple Mail faster.

I started F-Spot to check some old photos and it was getting stuck. Hmm wait F-Spot uses a SQLite database too, so I tried something like this.

Went to the F-Spot directory.

cd /home/dilantha/.gnome2/f-spot

Backed up the current SQLite database.

cp photos.db photos.db.20080326

Opened the database

sqlite3 photos.db

Then in SQLite I got some help, listed tables and ran vacuum on photos and photo_tags.

vacuum photos;
vacuum photo_tags;

Now F-Spot is running smooth as ever.

Running Bash Scripts in Windows Scheduler

Normally you can run scripts in the Cygwin shell. But I wanted to run a bash script in Windows scheduler. Find the Cygwin.bat file probably located in C:\cygwin. It looks something like this.

@echo off

chdir C:\cygwin\bin

bash --login -i

This batch file doesn’t let you run an external script with it. Add a %1 at the bash command’s end like this. What you are doing is passing the first parameter in Windows to bash.

@echo off

chdir C:\cygwin\bin

bash --login -i %1

Now drag and drop the Cygwin.bat file into the Windows scheduler window and edit running time properties etc. Now add the script to run at the end of the Cygwin command. For example like

C:\cygwin\Cygwin.bat ./bin/mysql/db.dilantha.info.sh

Windows Scheduler