Aaha Creative

Hello, I'm Aaron Harun, a New York based
Traveler, Developer and Web Consultant.
You're about to have an "AaHa!" moment.

AaHa Blog Archives

Sublime Text 3: Open File’s Parent Folder in Linux

Sublime Text 3 Open in File Manager

Here is a very quick script for Sublime Text 3 to open the current file’s parent folder in nautilus for Ubuntu. Installation is simple: edit the keybind files and save the python script below to the ~/.config/sublime-text-3/Packages/User/ folder. If you

Tagged with: , Posted in Blog on 12 April 2013

PHP Syntax Highlighting For Prism.js

Prism

I wanted to test the newly-released Prism.js since it promised clean markup and easy plugin development, but I found it was lacking a major feature for my own use: PHP Syntax Highlighting. So, letting the code be my guide, I

Tagged with: , , , Posted in JavaScript on 31 July 2012

Add Ext2, Ext3 and Ext4 partitions to Picasa 3 under Windows.

picasa

When dual-booting Linux with Windows 7, Picasa will not recognize mounted EXT2, EXT3 or EXT4 partitions under Windows. (First of course, you need to get windows to recognise the partitions with the EXT2Fsd drivers.) To add EXT4 (etc) partitions to

Posted in Blog on 13 June 2012

Dynamically Resizing Text with jQuery

dynamically-resized-text

Dynamically resized text ensures that when necessary, text can fit to a pixel-perfect width in any browser and any operating system. While fonts are similar enough across most browsers and OS, in headlines or other locations where overflow text would

Tagged with: , Posted in Demo, Hacks, JavaScript on 27 February 2012

Executing inline JavaScript when using AJAX

javascript document

AJAX is full of stumbling blocks. From browser support to user expectations, it can cause more problems than it solves when used at the CMS level. In AJAXed WordPress, I had to find a way to enable javascript processing on

Tagged with: , , , Posted in JavaScript on 27 November 2011

Stripslashes all values in an array with PHP.

PHP Stripslash array

Here is a very simple function to run stripslashes on an array and all of its child arrays. The function below is for PHP 5 and takes a single argument which should consist of an array. It loops through all

Tagged with: , , Posted in PHP on 26 July 2010

Another look at jQuery Performance: combining elements and IDs

Profiling jQuery performance

A question that came up in regards to jQuery Performance was: is it faster to define the type of element before you set the ID. Basically, is jQuery('textarea#content_box') better than jQuery('#content_box')? The thinking is that because the latter is more

Posted in Blog on 23 July 2010

jQuery: Fastest method to find Descendents

jquery

In jQuery, there are 5 different selectors that can find an element’s descendants. One of these methods, will grab only first-level children but it is included with the other four to demonstrate the differences. By profiling these 5 selectors, we

Tagged with: , , Posted in JavaScript on 19 July 2010

Escaping regular expressions in PHP

really-long-regex-to-validate-emails

Escaping dynamic regex strings automatically in PHP is a lot harder than you would think. You can’t just use a string like"\$myregex" because PHP will try to escape the $. You can’t even double slash it like \\$myregex because this

Tagged with: , , , Posted in PHP on 10 July 2010

FireFox Leading the Pack: Gradients on Buttons

gradient_buttons

See those wonderfully beautiful article and comment toggle buttons at the top of every post? (Or in the post image for those reading in a feed reader.) Those are images, but they weren’t created in Photoshop: they are screenshots of

Tagged with: , , Posted in Design on 3 July 2010

Moving WordPress: Replacing the Old URL in the Database

change-mysql-options

Moving a WordPress website can be quite the hassle, but with the following bit of MySQL it can be a lot easier to switch websites from one host to another. The following is a MySQL search and replace of all

Tagged with: , Posted in WordPress on 10 June 2010

CSS only Gradients in All Browsers

css-only-gradient

Currently, it is possible to create CSS gradients in IE 6, IE7, IE8, Webkit-browsers (Chrome 2.0+ and Safari), and Firefox 3.6+. As of this post, Opera doesn’t support CSS-only gradient backgrounds. There are other methods to create gradient backgrounds with

Tagged with: , , Posted in Design on 2 June 2010
`