• Save And Load Bash Profile From Dropbox

    With using different machines and installing a fresh copy of the latest Mac OS every year, I am constantly loosing my .profile. The .profile is a file used to save settings, shortcuts, and more awesomeness for your command line use in the Terminal app on Mac OS. I wanted to...

  • Test Your JavaScript As You Code

    If you are writing JavaScript, you should be testing and linting your code often to catch common mistakes. I enjoy using Sublime Text so I have installed Sublime-JSHint, a Submlime Text 2 plugin that checks my JavaScript code for nasty errors and other coding goodies. It’s super easy to setup...

  • HTML Validation on Local Mac

    I was looking for a better way to do HTML validation on web pages running on my local Mac. I found and have been using the stand alone validator from http://habilis.net/validator-sac/. Works great and I love that it validates my local pages.

  • JavaScript Test For Valid US Phone Number

    TLDR; Example and script at http://sandbox.michaelgrace.org/phone-number-validation/ In building an app, I needed to check for a valid phone number based on user input. After reading and learning more about US phone numbers than I cared about, I was able to come up with a basic way to check for a valid...

  • JSONP jQuery Ajax Error Handler Callback

    Are you using JSONP and jQuery and trying to handle non 200 responses? Getting frustrated that your error handler isn’t firing when it gets a 403, 404, or some other response code? Take a breath and repeat after me. “There is no error handling in JSONP” Now that you have...

  • IE8 & IE7 JavaScript Date NaN From String Error

    When trying to create a JavaScript Date object from a string I was getting an NaN error in IE7 and IE8. My JavaScript worked in all the other browsers I was testing in. I was writing the script to figure out future dates based on the date the user selected....

  • IE8 IE7 403 HTTPS/SSL Error MAMP Fix

    I was using browserstack.com to test a website on my local machine using MAMP when everything looked fine except on IE8 and IE7. I was getting 403 forbidden errors when trying to load the site in IE7 and 8 on Windows XP. Apparently the default SSL apache configuration in MAMP...

  • Mac OS X Quick Lock Screen

    Want to be able to lock your computer with a keyboard shortcut? Since OS 8 you can put the screens to sleep using Control + Shift + Eject (⌃ + ⇧ + ⏏). Here is how you can lock your computer from a keyboard shortcut Open up your system preferences and...

  • Publishing and Sharing Google Analytics Certification Certificate

    Passed the Google Analytics and want to share with the world your results? Here is how you can find and publish your certificate for anyone to view. How to: Log into your account at https://google.starttest.com/ Navigate to “Manage Test Records” Add a new test record Add details to new test record...

  • Personalizing Google Analytics

    Since I passed the Google Analytics individual qualification test I have been working to make the data captured in GA more actionable. I have found custom dashboards to be a great way to pull out the information that is useful to me at a glance. Note that this doesn’t replace digging...

  • Dynamic Navigation In MODX Revolution using Wayfinder

    If you are looking to build some dynamic navigation in MODX Revolution you should check out Wayfinder. It’s a great tool to get what you want done. You can find some great links to documentation for wayfinder at http://sottwell.com/articles/wayfinder.html The (almost) Complete Guide to Creating Menus in MODx Using Wayfinder...

  • Accessing Template Variable From Snippet in MODX Revolution

    If you need to get the value of a template variable (TV) in MODX Revolution from within a snippet for the current resource, you can use $tvValue = $modx->resource->getTVValue('foo'); More MODX Revolution template variable documentation

  • Preventing console.log Undefined Errors

    I don’t think it’s a good idea to leave console.log statements in production code, it’s a good idea to prevent your site from breaking if you accidentally do. I include this condition in the first script that loads on the page of most of my projects if (typeof console ==...

  • Set Production Flag in JavaScript Based on Domain Extension

    In a recent project I wanted to be able to dynamically set a production flag in JavaScript. Doing so would allow me to keep my production analytics free from dev and staging environment events. Because my dev and staging environments don’t run on a .com domain extension I was able...

  • New Job as Director of Front-end Web Development

    I am very excited to announce that I will be headed with my family to Tampa Florida to be the Director of Front-end Development for Branded Holdings, a Selling Source company. I am very much looking forward to the challenges and responsibilities that this new job will present. Along with...

  • Webkit Rendering Bug When Animating Absolutely Positioned Elements

    ADD A Z-INDEX TO YOUR ABSOLUTELY POSITIONED ELEMENTS! While building a web app, I ran into an issue with Chrome and Safari having a strange rendering issue when animating absolutely positioned elements. In testing it worked fine in IE and Firefox so I thought I was going crazy. Come to...

  • Advanced Google Chrome Logging

    tldr; Run in terminal: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1&<br /> tail -f ~/Library/Application\ Support/Google/Chrome/chrome_debug.log If you are wondering how to know just about everything that Google Chrome is doing, you can enable verbose logging to a file. If you are running on a Mac, you can follow similar steps to...

  • Pandora.com using Amazon.com images?

    Is it just me thinking this or is Pandora.com really using product images from Amazon.com? Maybe they are both using images from the same source? Who owns the image?   Pandora.com album art <figcaption class="wp-caption-text">Pandora Album Art Screenshot</figcaption></figure>   Amazon product Amazon product image <figcaption class="wp-caption-text">Amazon Album Art Screenshot</figcaption></figure>  ...

  • Cloned WordPress Redirecting Back To Original

    Was recently working on a WordPress instance for a client where we have a cloned version of the production installation in dev. Since WordPress stores its settings in the database it would redirect to the production instance when I tried to log into the WordPress admin on the dev instance....

  • Set Share Preview Content For Facebook, Google+, And More

    When I share pages from people’s sites and the preview is useless, it really annoys me. Here are some resources to help you figure out how to properly set the meta tags on your page so they can be shared more effectively by your audience. Facebook https://developers.facebook.com/docs/share/ Google+ http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1211158 LinkedIn...

  • Tracing PHP Memory Usage using Xdebug and Mamp on Mac

    I recently wanted to see which parts of my app were using the most memory in a PHP script. I’ve been using Xdebug and webgrind on MAMP on my local machine and loving it. Derick Rethans wrote a post a few years ago about how to use Xdebug to profile...

  • Pinterize

    There are lots of things around the web that I would like to pin on Pinterest but there are no images to pin! Have you gotten sick of seeing alerts like this? I have built the very simple Pinterize bookmarklet! It’s a simple bookmarklet that allows you to inject an...

  • Dropbox File Versions Lost On Folder Name Change

    I Love Dropbox! I love that as I save files, dropbox saves each version that I save so I can revert or view an older version. I recently ran into a ‘gotcha’ with file versions. I renamed a folder with a lot of files in it within my dropbox folder....

  • IMAP email UID vs Message Sequence Number

    I’ve had the chance to play around with some email code recently and it’s been fun. Here is something that I learned that I think should be easier to find for those who are getting into writing an app that handles emails via IMAP. What is the difference between an...

  • Standing Desk Impressions – First Week

    Some of you may have seen a photo or know that I have been trying out standing at my desk recently. Here are some of my thoughts after a week. Findings: Love how it has improved my posture. Feels great for my back and my shoulders. I don’t slouch like...

  • Make Your Content Pinterest Pinable

    Found a great motivational post, “Fail Upwards“, that I wanted to put on my motivation board on Pinterest. Clicked my “Pin it” bookmarklet to pin the post but was greeted with this sad message: If you want your content to be sharable on the booming social sharing site, Pinterest, then...

  • Happiness And Joy Is Your Responsibility

    This blog post isn’t so much about programming or the technical stuff I deal with day to day but I feel that it is important enough to share it here. If these two videos are not viewable on your device I apologize. The next video is on the New York...

  • Colon In XML/RSS Messing Up PHP’s SimpleXML

    Recently used PHP’s simpleXML to parse through a blogs RSS feed. The parsing worked great and it was simple and clean. Only problem was that the XML nodes that contained colons in the name were being discarded by simpleXML. Example: <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> Not sure if this is a bug, error,...

  • Google Street View In Your Stores

    Google Street view is coming to the inside of your stores! Probably old news for some of you but this is the first time that I have seen it and I like it! I needed to get some parts on my bike replaced today so I looked up a bike...

  • HTML5.TX Austin Developer Conference

    Had a great time this weekend attending the HTML5.tx developer conference. Lots of great developers and designers in the Austin area. Was fun to meet people, learn, and review technologies and techniques for building better experiences online. Some of the things discussed at the conference were HTML5 & DOM APIs...