Naldwhal Designs

Reynaldo Pagtakhan AKA “Naldo” began drawing at an early age and continued doing so for quite a long time. As real life continued, his artwork tended to suffer as other priorities took precedence in his life. It was until recently when the creative spark was renewed within himself. Among one of his first projects was an Oakland map showcasing the various districts within the town he calls home now. Naldo can be seen working at the local coffee shop across his street either working on his computer or doodling in his sketchbook. It was on one occasion when someone made a comment that he should sell his designs; And that he’d be happy to wear a t-shirt with one of his designs displayed on it. This is where the idea of this site came into fruition. And about the name, “Naldwhal”. The “Nald” part is simple; it comes from the Naldo in his name. The “Whal” portion of the name comes from “narwhal”, the toothed whale that lives in the Arctic — which is rarely seen by the rest of us. So, since Naldo had rarely done any creative projects until lately — it made sense. (Plus, the domain name, naldwhal.com, was...

Local Dev on Mac with MAMP

If you are doing lots of local PHP development and you hate moving stuff back and forth from your htdocs/ folder (where your default web root is located), then you should set your Mac to use virtual hosts. For example, let’s say you have a site called “sitename.com”. You could set it up so “local.sitename.com” would bring up your local development site through your web browser. Below are the necessary steps to accomplish this feat. Note: you should have admin access to edit your hosts file. First, make sure that your MAMP environment is using port 80 by click “Preferences…” in your MAMP panel and clicking the “Ports” tab. Click “OK”. Then, Edit your hosts file by typing the following command in your Terminal application. It should prompt you to enter the admin password. You should see the following contents. And you should add your own “127.0.0.1” line with your desired name, i.e. sitename.com (Highlighted in white) and save the file. Next, navigate to “Applications > MAMP > apache” and open the “httpd.conf” file in a text editor app like TextEdit. And find the text in the file denoted by “# Virtual Hosts” (Noted as line 524 in the image). Uncomment the next line by removing the hash (#) character (Denoted in yellow in the image). Afterwards, open up another file located in “Applications > MAMP > apache > extra” and open “httpd-vhosts.conf”. Add lines similiar to lines 45-48 in the image below. Then you should modify the contents in yellow to your desired values. Restart MAMP by clicking “Stop Servers” then “Start Servers”. Finally, open your browser and...

Gzip Your CSS and JavaScript

When I finished implementing my site, I decided to check it’s YSlow grade. And lo and behold, it got a “C”. So, as I was knocking each markdown off my report card list, I came across an item “Compress components with gzip”. I’ve read about it and kinda understand it, but i had never actually performed this type of compression. Since I’m on a Mac, I decided to locally compress my files thru the Terminal app. The process I used can be found here. I went with his Option 1 (Compress locally and upload).  The command I used in Terminal is the following (where yourcssfile is the name of your css file. Ha!): gzip -c --best yourcssfile.css > yourcssfile.css.gz After gzipping the css file, I then did the same thing with my JavaScript files. Then, I uploaded these two new gzipped versions of my files to my webhost and changed my references in my HTML files. I modified my .htaccess file again based on the link above and used the following: <files *.js.gz> AddType "text/javascript" .gz AddEncoding gzip .gz </files> <files *.css.gz> AddType "text/css" .gz AddEncoding gzip .gz </files> RewriteEngine on #Check to see if browser can accept gzip files. ReWriteCond %{HTTP:accept-encoding} gzip RewriteCond %{HTTP_USER_AGENT} !Safari #make sure there's no trailing .gz on the url ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$ #check to see if a .gz version of the file exists. RewriteCond %{REQUEST_FILENAME}.gz -f #All conditions met so add .gz to URL filename (invisibly) RewriteRule ^(.+) $1.gz [QSA,L] I refreshed and my page came up quicker and my YSlow score improved. Yay! Success! Update: The above worked in all browsers except...

Using wget on Lion

wget does not exist in Leopard, you should use “curl” set up an alias for wget to curl -O which does exactly the same thing: echo 'alias wget="curl -O"' >> ~/.bash_profile Note: if the command doesn’t work after creating the alias, it’s probably the .bash_profile loaded in your current terminal session didn’t make the alias effective. So, just create a new Terminal window and the alias should be there....

Preventing Pinterest Pins

If you are a site owner and have your own copyrighted images embedded throughout your site, and you do not want anyone to pin your image(s) onto their interest board directly, then you can add the following meta tag to your HTML code in the header. <meta name=”pinterest” content=”nopin” /> Note: Users can still get around this by downloading your image(s) and pinning the images directly thru...

Photoshop CS5 Scan Issues

After upgrading my Mac OS to Lion, I realized I just shot myself in the foot when I tried to open Photoshop CS2… and it failed to open. I had tried to figure a way to get my CS2 working on Lion, but finally I just gave in and decided to upgrade to CS5. Once I upgraded and Photoshop was working again, I wanted to scan something in. But when I went to Import from my scanner, the option to Import wasn’t listed in the menu. I couldn’t believe it! I figured I just needed to update my drivers for my Canon MP470 and it would return. But after upgrading the software, it still didn’t show up. Soon, I saw a reference in a forum posting mentioning that Photoshop may be running in x64-bit mode. To make Photoshop run in 32-bit mode: Highlight the application in Finder (located in your Applications/ folder) Get Info (Command-I) Check the box “Open in 32-bit mode” Then re-start Photoshop. That did the trick for me… Now, back in...

To Print a Secure PDF

Download Gimp or another GNU PDF viewer-type of application. Open the PDF document. (I usually like to import as layers) Then Print. (You have to hide each layer to display the next so you can print each...

Carriage Returns in Titles

Since I’m always forgetting how to add carriage returns in my title attributes, I’d thought I’d add it here. The original HTML looked like the following: which produced the following mouseover toolip. So, to add carriage returns (line feeds) to your tooltips, you just need to add the &#013; entity. Now the code would be: … and the new tooltip would look like: Note: Please make sure to test across all platforms; I’m not sure if it works on every browser — and right now, I’m too pooped to test. Update: This tip doesn’t seem to work in FF3.6.3 on Mac. However, I used this tip on an intranet site where IE is only...

Levis Contest

After watching Project Runway, Levis announced a contest to design your own denim masterpiece. Below are my quick submissions.

A Wedding Portrait

I decided to sketch a wedding gift for my friends, Elaine and Heath. Since I haven’t drawn in such a long time, I wasn’t sure if I could still do it. When I presented the drawing to them, they gave me such an amazing reaction — it made me extremely happy to see such joy from something I created. I hope to keep drawing more and more. Below is a photo of the couple and my...