My Digital Story

Just to make live easier…

Permanently delete file in Mac OS X Finder

One of the most annoying part when using Apple Mac OS X is to permanently delete file in Finder ( the equivalent of Windows Explorer in Windows).

To delete file in Finder window, you need to press CMD+delete which will move the file to Trash bin. What actually happen from this action is, the file is just “hidden” from user in that particular folder/location. The file is yet permanently deleted. While the intention of this feature is well understood, which is to avoid us from mistakenly and unintentionally delete our files, sometimes it is just too annoying as after that we havw to go to Trash to actually empty the Trash. Furthermore, in Trash, you can not permanently delete individual file there. Once you press the “Empty” it will delete all the files in Trash.

For example, when you need to empty file in USB flash drive to physically free the disk spacw, if you just delete the files by moving them to Trash, your USB flash drive will still shows that it is still not yet EMPTY. Only after you empty the Trash, then only the USB flash drive will really be empty with full of free space.

Luckily someone has created an Applescript that will do just that, permanently delete your selected file in Finder. In addition to that you need an application called Spark that will assign keyboard key in order to execute the script. I assign Shift+delete keys to execute the script.

Both the Script and Spark application can be accessed below:

set frontAppPath to (path to frontmost application) as string

if the frontAppPath ends with “” then
tell application “Finder”
set selectionList to get selection as list
set selectedCount to count items in selectionList
–Added code1
display dialog “Do you really want to delete this item?” buttons {“OK”, “Cancel”} default button 2
if the button returned of the result is “Cancel” then
–End of added code1
if selectedCount > 0 then
repeat with i from 1 to number of items in the selectionList
set selectedItem to item i of the selectionList
set selectedName to the name of selectedItem
set homePath to (path to home folder) as string
set trashPath to homePath & “.Trash:”
set deletePath to trashPath & selectedName & “:”

if not ((kind of selectedItem as string) is equal to “Volume”) then
if (selectedItem as string) contains “.Trash” then
set posixPath to POSIX path of (selectedItem as string) as string
do shell script “rm -rf “” & posixPath & “””
deletePath as alias
display dialog “Error: file named “” & selectedName & “” already exists in the Trash.”
on error
tell application “Finder” to delete selectedItem
do shell script “rm -rf ~/.Trash/”” & selectedName & “””
end try
end try
end if
end if
end repeat
end if
–Added code2
end if
–End of added code2
end tell
end if

Download SPARK


23/02/2011 Posted by | Uncategorized | , | 1 Comment

Make Application Exception/Exclusion for Kaspersky Anti-Virus

If you run any anti-virus which some version of it also acts as firewall, you will face problem to run certain application that require internet access. Normally the anti-virus should be able to make that exception automatically during the application installation process. However, in certain cases, you have to do it manually.

Recently, I need to run Cisco AnyConnect which is a Virtual Private Network (VPN). Whenever, I try to establish the connection, it will fail. Immediately I know, this is problem caused by Kaspersky anti-viru firewall. The most common practice but strongly NOT recommended is to disable your anti-virus for a while. By doing so, you actually now open up your computer to either network/virus attack. Strongly not recommended.

So, here is the more practical and safer way. You have to create exception in Kaspersky so that Kaspersky will not block any network traffic by the application.

Open your Kaspersky. Go to Setting

Go to the "Options> Threat and Exclusions"

Go to Exclusions

Click "Add" to browse application for the exclusion

Or you may browse from the list of application that is provided from the list

23/10/2010 Posted by | Uncategorized | , | Leave a comment

Get place coordinate from iphone Google Maps

In one of my previous post, I shared how to obtain coordinate (North/South, East, West) from Google Maps on web browser. This time I will show how to do same thing but using Google Maps in iphone. This is particularly important when you require to go to some unknown, unfamiliar place while you are away from office computer or personal laptop. Especially important for Malaysian users as even if you have the best GPS navigation device, due to poor address system in Malaysia (UMNO/BN punya pasal la), you can not rely on “Search using Address” function. Those in UK, Europe or other developed country including Singapore, you can reach anywhere in those country provided that you know the place’s post/zip code or street name.

The idea of this tip is to get coordinate from iphone Google Maps and then enter the coordinate in your GARMIN, Tom-Tom (I learnt from low yat forum that it will be available in Malaysia at much cheaper price than GARMIN) so that you can reach your destination hassle free afterward.

Follow the steps:

1. Go to iphone Google Maps. To get your destination, you may type to search your friend/office “Taman, Dewan,” etc. Or, if the place of your interest is not searchable, you may browse the map by first search the nearest city or any other popular landmark.

2. Press and hold the exact place on the map. This will create a “Dropped Pin” or pin bearing the name of the place. Refer to my picture below.

3. Press the “>” symbol on the right side of the dropped pin.

4. Press the “Share Location”

5. Choose sharing method, either Email or MMS. Email will be much faster. Use email address that you can access from your iphone (Gmail, Exchange, etc). Remember, in this method you will get your coordinate from your email.

6. After you send the email, go to your Email application to find the email sent from Google Maps.

7. Open the email and click the “Dropped Pin.” Your iphone will bring you back to Google Maps and this time on the search bar, will indicate the location and display the coordinate e.g. 3.11111, 101.33344. This actually mean East (E) 3.1111, North (N) 101.33344.

8. Now you can use the coordinate to use in your GARMIN or any other GPS navigation device. Make sure you preset the coordinate format in your GPS device to follow the format given by Google Maps which is in E XX.XXXXX, N YY.YYYYY. If not you will have trouble to convert to minute/second. More tedious. Good luck…

10/10/2010 Posted by | Uncategorized | 2 Comments

Commands to check DNS-323 health status

The following are some important set of command that I frequently use to check things in my fun-plug enabled DNS-323 NAS:

Check temperature: temperature g 0

Check fanspeed: fanspeed g

Check disk spinning status: dns323-spindown

check torrent status: transmission-remote -l

27/09/2009 Posted by | Uncategorized | | Leave a comment

Mount samba cifs drive to DNS-323

This is the issue that take me the longest to solve. For almost more than 6 months (close to a year i think), I just can not make my DNS-323 fun_plug to mount network drive (samba). I did refer to the DNS-323 forum and strictly follow all the instruction but to no success at all.

Today, I received a notification mail from the discussion thread in the forum and one guy (kennethxu) wrote there that he successfully managed to mount the samba drive (his shared drive in his computer) to the DNS-323 fun_plug file system.

This feature is very important for me and I believe to other DNS-323 users. With any samba drive mounted to the fun_plug, we can backup, copy between the mounted samba drive and DNS-323 hard drives. For me I need this feature so that I can copy all my completed torrents from DNS-323 to another hard drive (which is actually a media player which serve a TV recorder and media player to LCD screen) located in my living room.

Follow to following steps:

  1. Download the cifs.1.50.ko from the thread or click HERE
  2. Use the following command:

insmod cifs.1.50.ko
mkdir /mnt/sharename
mount -t cifs //windowspcname/sharename /mnt/sharename -o username=windows-login-name,password=windows-login-password

So now you may try to list the file inside the newly mounted drive using:

ls /mnt/sharename

What a big relief, so I have no excuse to buy any new NAS now 🙂

This really make D-Link DNS-323 as the world best home Network Attached Storage (NAS). But only with fun_plug hack.

27/09/2009 Posted by | Uncategorized | , , , | 3 Comments