Alvin Poh

Tag: file (page 2 of 3)

How To Install IonCube Loader On MAMP On Your Mac

ioncubeMAMP (Mac, Apache, MySQL, PHP) is a package that allows you to run your own PHP-enabled web server with MySQL easily on your Mac. However, if you’re looking for additional libraries like the ionCube libraries, you’ll need to download and install them yourself. That’s not bad because it’s not hard at all.

What you need is to go to, and download the ionCube loader file for your O/S version. For example, I’m running a Macbook Pro unibody, and so I get the x86 version of the loader.

Now once the file is on your computer, extract the contents and copy the file (e.g. ) into your MAMP’s PHP5 folder. For the default installation of MAMP, it should be this path:


Now you need to edit the php.ini, which is found here: /Applications/MAMP/conf/php5/php.ini

Scroll to line number 1085, hit enter, and then add this line:


That’s all there is to it! Just stop and start the MAMP servers, and you should now have ionCube loaders up and running with PHP!

How To Find Out What’s Locking Files or Folders in Mac

One of the first problems that I came across the Mac was the “File in use” error that occurred whenever I tried to unmount a hard drive, or unmount a USB thumb drive. It was annoying because I didn’t know how to find the source. In Windows, I would face the same problem too, but I had a program that I used to tell me the offending application. It was handy because it would show me what exactly was locking up my file, and I could unlock/remove its hold.

On the Mac, I had to search for something that offered the same functionality, and I found it in the form of a terminal command:

sudo lsof | grep -i

Basically, the command will look for your filename in the list of open processes, and display all relevant information about it on screen. I find this unwieldy though, so I searched around somemore and found a GUI replacement to this terminal command! It’s called What’s Keeping Me, and it does what the terminal command does, except in a pretty GUI.

whats keeping me screenshot

So now you can find out what’s keeping a file locked on the Mac. Go grab What’s Keeping Me now – it’s donationware, so you can use it for free, and make a donation if you find it useful. Go to the What’s Keeping Me website.

The Top Free Backup/Sharing Service (With Some Ingenius and Creative Ideas!)

I wasn’t a Dropbox convert until recently, because I didn’t understand what the big deal was with it, but I’ve tried it recently because of a school project, and it’s like I’ve seen the light!

When I first signed up for the service (it’s free), I just used the web-based interface. However, I needed to share files, and the web-based interface was just too clunky. It was just after one day that I installed the Windows application. Normally, I have a disdain of installing programs on my system because I don’t like the additional clutter and resources used, so it takes a lot for me to like a program to install it.

dropbox logo

I like the Dropbox program. In fact, I fell in love with it instantly. It’s lightweight, fast, and non-obstrusive.

Since I collaborate with 5 other team-mates, we update and create files all the time, and Dropbox acts as a simplified versioning system. There’s a small notification window everytime a file gets updated, and what’s great is that everything is done automatically and in the background! There’s also no worry that someone will accidentally delete or overwrite a file, because Dropbox maintains old versions of your files too!

Since then, I’ve been looking at more ways to use Dropbox. With it’s cross-platform support (Linux, Mac, Android, iPhone, iPad!), that’s not hard. Here are just some great ideas to get you started!

1. Share Music

This is one of the most obvious methods – depending on the size of your music collection, you can share your music files and access them on any computer or device that you’re on!

2. Share iTunes Libraries

On the same note, if you’re using iTunes, Dropbox is a great way to ensure that your iTunes libraries are synced across your computers. You just need to move your iTunes library. To do so, just follow these three steps:

  1. Cut and paste your existing iTunes library folder into your Dropbox folder
  2. Start iTunes while holding on to the Shift key (or the Option key on Mac OSX)
  3. A dialogue box will popup. Just browse to the location in your Dropbox folder and hit ok!

3. Share Photos

With the same logic as sharing music, except better, because Dropbox supports creating photo galleries too. Just share whatever folder your photos are in, and give the public gallery link to whoever you want to share the photo gallery with.

4. DIY Security Camera

Use a free application such as WebCamFirst or YawCam, have it setup to take photos (YawCam even has a motion detection mode), and have the photographs saved to your Dropbox folder. Dropbox will do the rest and you’ll get the photographs. No worries about the intruder deleting the photographs too – Dropbox saves a copy of all deleted files!

5. Simple Versioning System

If you want a simple versioning system, like CVS/Git/SVN, but don’t want the hassle and deal with simple files (word processing, photos, etc), Dropbox is for you. Versioning system are used primarily by the software development industry because it’s the best way to keep your code in sync with multiple people, branch out in your development, and have automated backups all in one. However, it’s a bit more complex than the average user requires.

This is where Dropbox comes in. If you work on Word documents or other Office documents, or even media files, with a team of people, then Dropbox works fantastic. Every file will get backed up, and synced with everyone automatically. You will even know, and be protected, if you’re saving your file over someone else’s newly uploaded work (Dropbox will save a “conflicted” version of the file).

Don’t have Dropbox yet? Well, what are you waiting for? Get Dropbox now.

How To Print The List of Files in a Folder on the Mac

Sometimes you just need to print out the list of files in a particular folder. While I was on Windows, sometimes I’d just take a screenshot of the folders’ contents, but when I had to print it out or when the folder’s contents were too much, I had to use a third-party software just to accomplish this.

On the Mac, you have Automator! Automator allows you to get the contents of any folder on your Mac. With the contents, you can save it as a text file so you can print, copy, or do whatever with it.

Here’s 5 easy steps to list your folder contents on a Mac:

  1. Open Automator
  2. Create a new workflow
  3. Drag: Ask for Finder Items (Change “Type” to Folder)
  4. Drag: Get Folder Contents
  5. Drag: New Text File (Choose your filename and location)
  6. Hit “Run”

And voila! Your folder contents are saved to a text file, ready to be used.

Tip: You can search for your actions, e.g. search for “folder”, and you should see the “Get Folder Contents” displayed.

How To Remap Keyboard Keys In Windows (Such as the with Apple Keyboard)

I use the Apple bluetooth wireless keyboard, but I use it with my Windows computer, not a Mac. I love it though, and I think it’s the best bluetooth keyboard around – the problem is, while most keys generally work fine, certain keys are missing.


For instance, on the Apple keyboard, the command key is the Windows key by default, so that’s convenient. However, I don’t have the Home and End keys, which make text-editing cumbersome. Furthermore, I have no Delete key. That sucks, because you can’t even delete a file in Explorer with the keyboard this way. In addition, the keyboard has the left Alt key and the left Windows key completely opposite from my notebook (a Lenovo Thinkpad T410s).

So I went about looking for a solution, and found it in the form of AutoHotKey. It’s a free, open-source utility for Windows that enables you to create scripts for automating keystrokes and mouse clicks. What’s important though, is that it allows you to remap keys as well.

I chose this solution over SharpKeys (another key re-mapping utility) primarily because AutoHotKey allows for “profiles”, which is useful because sometimes I use my notebook alone without my external keyboard, and I want the default key mappings to be restored. With AutoHotKey, I just run a script that remaps the keys that I want, and whenever I’m outside with just my notebook, I disable the script and I’m back to my default key settings.

I had to use a script that was generously given to the community, and modify it to suit my needs. If you’re interested, here it is: AutoHotKey script for Apple Keyboard.


  1. You’ll first need to install AutoHotKey.
  2. Then, download my zip archive (AutoHotKey script for Apple Keyboard), and extract it to wherever you want.
  3. Now, just run the file “Keyboard Media Keys.ahk”.
  4. All set!


What this script does is to remap the eject key on the keyboard to be a Delete key. I’ve also modified some of the Apple keyboard keys to suit me though, and you can change it in the file “Keyboard Media Keys.ahk”. Look for them from line 46-49, and they’ll look like this:


So what that means is that I’ve swapped the positions of the left Alt key and the left Windows key. I’ve also set the right Alt key to be End and the right Windows key to be Home.

Hope you find this useful and let me know if you need further help with it!

How To Rotate Images or Pictures On Mac OSX

I was trying to rotate images on the Mac, and was getting annoyed at the apparent lack of functionality to do so. In Windows, you could rotate images in Explorer and in Windows Preview after you’ve opened up the file. On Mac OSX, the Preview app doesn’t come with the “rotate” buttons visible by default. What you need to do is to right-click on the Preview menubar (like in the screenshot), and select “Customise Toolbar”. There, you’ll find the elusive “rotate” button. Drag it on to your toolbar, and you should see it there. Now, you’ll be able to rotate images in Preview by clicking on that button!


If you’re a keyboard-kinda person, the keyboard shortcuts for rotating images are:

Apple + L or Apple + R

Why I Chose To Switch To Mac OS Over Windows 7?

So several people have asked me why I made the change to Mac OS, from being a Windows user for over 2 decades. Here’s why:

mac versus windows

1. A more functional laptop

I wanted a new laptop. I narrowed it down to a Lenovo, Sony or Macbook. 2 years ago, I wouldn’t even consider the Macbook, but these days the Macbooks come with a very functional touchpad, a gorgeous screen, and very comfortable keyboard. Not only that, it’s unibody design meant less of the flaws that you’ll get with a conventional laptop, such as my old Thinkpad with its warped base, cracked plastic bits, and creaky metal hinges (still a solid machine nevertheless).

2. A new OS

Windows 7 was released, and with that, it means a new learning curve. Why not learn Mac OS? Granted, it’s probably steeper than Windows 7, but it’s still something that you have to learn anyway.

3. Focus on function

The Mac OS isn’t just pretty, it’s more functional too. One thing that always left me irate is the activation of Windows. Even genuine users would get bugged with activation alerts and be hassled with the procedure. Mac OS? Just buy the CD, install it, and you’re set. That’s beautiful.

Is everything all good and rosy though? Not at all. Here are some quirks that I still haven’t gotten used to:

1. Replacing folders in finder

This is a file operation that I don’t get at all. When you overwrite a folder in Mac OS, the entire folder gets replaced. E.g. assume you had a folder named MyFolder. Inside MyFolder, there’s 10 files.

Now imagine you suddenly discover that you had another version of MyFolder elsewhere on your hard drive, and it has 5 files inside that’s not found within the 10 files. Great – now you have 2 locations, but you just want 1. So you just copy the 2nd folder over to the original location.

Under Windows, the 5 files will be added to the original 10 files, so that you will have a total of 15 files.

Under Mac OS, the new folder will completely replace the original folder, i.e. you will find a total of 5 files (the new ones) inside. What happens to the original 10 files you ask? They’re GONE.

I found out the hard way about this (my files were completely overwritten and unretrieveable). No undo function for that too.

2. Mac Office 2008

It sucks. If you do a lot of documents and work in Office 2008, then this may be a huge deal breaker. Mac Office 2008 runs so slowly and has such a counter-intuitive interface that I find myself loading up VMWare just to run Office under Windows.

I’m not kidding when I say it takes 10-20 seconds for Word (or any other Office app) to open up. Besides that, try auto-fitting a table to the page width, or changing a document theme, or styling text (e.g. headers), or inputting smart art. You’d feel like killing yourself. And that’s not an exhaustive list, by the way.

I have no idea why the MacBooks in the Apple stores open up Microsoft applications so fast.

3. Finder

It sucks too. First of all, what’s Finder? Finder is to the Mac OSX as Explorer is to Windows. My first grouse: there’s no cut in Finder. You’ve only got copy and paste, which is absurd, even with all that talk about it being a more secure operation. I had to look for alternative file browsers to use on Mac OSX because of this missing functionality.

Second grouse: you can’t move things around intuitively because it doesn’t have a fixed folder list on the side. If you are ten folders deep and want to drag a file out to the top folder, you’ll have to pull serious tricks to do so (even with that spring-loaded thing). In Windows at least there’s a folder list on the side that allows you to go to any folder that you want easily. I had to solve both these problems by getting PathFinder, which is what Finder should really have been.

4. Flash

Again, this sucks. Adobe has clearly put Windows as their platform of choice, and Unix a distant second. Anytime you run Flash or Air on your Mac, you’ll see a huge spike in CPU usage. Sometimes if you leave something running – like GrooveShark, Pandora, or something like that – your system can be brought down to its knees. Unlike the above issues, this problems has no workaround at all, except to wait for Adobe to beef up Unix support for Flash/Air, which is annoying.

Olderposts Newerposts

Copyright © 2015 Alvin Poh

Web Hosting by VodienUp ↑