Web Development

I think I wrote a book: Functional Programming in JavaScript

Submitted by Danny on Thu, 04/23/2015 - 14:56

You never know where life will take you. It may take you rock climbing in Argentina, it may take you to a farm in Nebraska, it may take you to a high-rise building in San Jose. Starting in October 2014, life took me (or, my name at least) to a publishing company in Birmingham, United Kingdom. A colleague of mine, Trent Hauck, wrote a book for the same publishing company and asked me to be a technical editor. I said sure! Little did I know that the experience would end up with me writing a book of my own.

Functional Programming in JavaScript by Dan Mantyla

Using Javascript/jQuery to check if offsite file exists with given URL

Submitted by Danny on Thu, 10/09/2014 - 15:30

So I needed to see if an MP3 was successfully uploaded to our streaming server, and display the status on our website where our user's access the upload form. However, I ran into some issues with Access-Control-Allow-Origin access headers and with just how to acquire the status code. It always fails, whether or not the file does exists, because the browser doesn't allow XMLHttpRequest from a different domain to try and prevent cross-site-scripting. The solution? Using the JSONP datatype, a sort of consensual cross-site scripting hack!

How to add Google Web Fonts directly to your stylesheet

Submitted by Danny on Mon, 05/19/2014 - 12:15

If you're using a CMS such as Drupal or Wordpress, it's not possible to add the link tag for the css file that google provides you&ndash; i.e. <link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>&ndash;without installing a module that would allow it (and who wants another module to maintain?). Here's a quick workaround I discovered that makes it really easy to simply add the css code you need directly to your stylesheet.

Inspect and save apache request headers

Submitted by Danny on Tue, 04/22/2014 - 13:07

I wrote this function because one of our web apps that was communicating with our web server suddenly began receiving Error 406: Not Acceptable (The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request). So I inserted this bit of code to capture exactly what that accept header was and see if we could fix the problem. It writes the output to a file on the webserver.

Why You Should Not Use WYSIWYG Website Editors

Submitted by Danny on Tue, 12/03/2013 - 15:20

I built a perfect, beautiful, wonderful website using the Drupal CMS, Amason S3 and CloudFront for Atipa Technologies. Everything worked flawlessly and looked amazing. After I left the company, they decided to duplicated the work of a real web developer with one of those WYSWYG website editor (Adobe Muse by the looks of the source code). The result, as you can see, is pitiful. An uninspired child could make a better website than that. For shame...