Just this past week I migrated this blog over to Jekyll from Drupal. I had been using Drupal for the last couple years and I was getting frustrated with how many steps it took to post articles. So I decided to make the switch. Looking that the sparse Jekyll documentation... Read more
Colorize is a simple PHP class that allows you to supply template / source images and easily replace color(s) in them and save them as copies. It could be useful if you are building a theme generator for a site or framework. Or if you have to replace the same... Read more
Here is a simple function that will get the url of the current page. /** * getFullCurrentURL() * @author Jesse Baird <jebaird@gmail.com> * @since 09/18/2009 * @uses gets the full url of the current page * @return string | IE http://www.jebaird.com?var=val&test=yes */ function getFullCurrentURL() { $url = 'http://'; //are we... Read more
Over the past month or so I have been toying with the idea of developing a way to cache dynamic PHP pages with out a lot of overhead. I stumbled across this blog entry: http://papermashup.com/caching-dynamic-php-pages-easily the idea was so simple it was almost too easy. So I took it upon... Read more
A couple of days ago I was out on a run and I starting wondering which statement was faster, a elseif() or a switch(). I am a big fan of switch statements. I like how clean they look and its really easy to add a new condition to them. I... Read more
I just started on a project that I knew was going to need some sort of data lock that would prevent 2 users from editing the same data at the same time. At first I thought that i would have to write a function that behaved like the C function... Read more
I was updating some code on dirtondirt.com. We had changed the way sessions/logins where used on the site. Everything worked great in Firefox. But we were getting complaints that it was randomly dropping logged in users using IE . I was was not able to recreate the issue so it... Read more
I was updating some code on dirtondirt.com. We had changed the way sessions/logins where used on the site. Everything worked great in Firefox. But we were getting complaints that it was randomly dropping logged in users using IE . I was was not able to recreate the issue so it... Read more
Finding good examples for Calculating Distance in Miles from Latitude and Longitude Using Mysql and PHP wasn’t as easy as I thought it would be. I thought I would compile the working quires and the functions that I wrote/found. I found a very good paper on the topic at Scribd.... Read more
A couple of projects ago I needed the ability to have international users. I looked for some php functions that would make the task of registering users a little easier. I found some html lists and turned them into php functions that return arrays ** * getAustralianTerritories() * @since 1.2... Read more
Pagination is one of the simple features of a site if used right can be a great feature. For something very simple it seems to be a resource hog. For a while I have been looking for a way to paganate with out issuing two database queries. After some quick... Read more
I just started on a project that I knew was going to need some sort of data lock that would prevent 2 users from editing the same data at the same time. At first I thought that i would have to write a function that behaved like the C function... Read more
Finding good examples for Calculating Distance in Miles from Latitude and Longitude Using Mysql and PHP wasn’t as easy as I thought it would be. I thought I would compile the working quires and the functions that I wrote/found. I found a very good paper on the topic at Scribd.... Read more
Pagination is one of the simple features of a site if used right can be a great feature. For something very simple it seems to be a resource hog. For a while I have been looking for a way to paganate with out issuing two database queries. After some quick... Read more
Finding good examples for Calculating Distance in Miles from Latitude and Longitude Using Mysql and PHP wasn’t as easy as I thought it would be. I thought I would compile the working quires and the functions that I wrote/found. I found a very good paper on the topic at Scribd.... Read more
I was updating some code on dirtondirt.com. We had changed the way sessions/logins where used on the site. Everything worked great in Firefox. But we were getting complaints that it was randomly dropping logged in users using IE . I was was not able to recreate the issue so it... Read more
Recently I ran in to a small bug in Internet Explorer where on an empty cache it would take minutes for script.readyState to equal 'complete' after the script had been successfully loaded from the server. But if you refreshed the page , script.readyState would equal complete on page load. var... Read more
I was updating some code on dirtondirt.com. We had changed the way sessions/logins where used on the site. Everything worked great in Firefox. But we were getting complaints that it was randomly dropping logged in users using IE . I was was not able to recreate the issue so it... Read more
I was updating some code on dirtondirt.com. We had changed the way sessions/logins where used on the site. Everything worked great in Firefox. But we were getting complaints that it was randomly dropping logged in users using IE . I was was not able to recreate the issue so it... Read more
In a soon-to-be-released project, I decided to give web components a chance. Instead of using frameworks like x-tags or polymer, I went with the plain ol’ vanilla JavaScript web component APIs with little to no external dependencies. Browser support for web components is pretty good, and with the use of... Read more
Timeout is a simple jQuery plugin that allows you to delay the execution of code for a certain number of milliseconds. It works like the jQuery delay plugin http://www.evanbot.com/article/jquery-delay-plugin/4 which i didn't know existed at the time I wrote this plugin. plugin code /* timeout a setTimeout wrapper for jQuery... Read more
Recently i was working on a project that required a flash media player. I was trying to integrate JW FLV Media Player using SWFObject. After losing a few hours of my life trying to pass a variable in a query string to a php script that generated a XML play... Read more
When creating a function in javascript its a good idea to check object the object type(s) of the arguments pasted to function. Lots of times you end up with code looking like this to do this if(typeof(foo)=='undefined'|| foo==''){ ////do something } Earlier this week I ran across Paul Irish's jQuery Anti-Patterns... Read more
A couple of days ago I was out on a run and I starting wondering which statement was faster, a elseif() or a switch(). I am a big fan of switch statements. I like how clean they look and its really easy to add a new condition to them. I... Read more
One of the features UI that Google wave uses is what I call the "overflow" menu. If you have a wave account you may have noticed that depending on your browser window size not all of the menu options are shown. The hidden options tucked away nicely in a drop... Read more
Timeout is a simple jQuery plugin that allows you to delay the execution of code for a certain number of milliseconds. It works like the jQuery delay plugin http://www.evanbot.com/article/jquery-delay-plugin/4 which i didn't know existed at the time I wrote this plugin. plugin code /* timeout a setTimeout wrapper for jQuery... Read more
Over the holidays I started reading Talking with Tech Leads by Patrick Kua. Having just completed reading the novices section of the book and found it spoke to the many challenges that I faced during my first year as a Tech Lead, I though would share some of my own... Read more
EdgeCore just moved office buildings and I was put in charge of setting up the network and phone systems. A couple of the guys recommended VoIP. It sounded like a good idea at the time. So I went along with the recommendation. I got a quote from 8x8.com and everything... Read more
Every once in a while I run in to a small issue with Firefox not loading correctly when i save my session. It seems to happen when I have multiple tabs open that have lots of JavaScript running in them. In my case I couldn't access the GUI like in... Read more
Over the past couple of years I have run into several cases were I needed to interact with the dom properties related to scrolling an element. I found my self wishing / searching for library to handle the nuances of the api. So I wrote scrolljs. Scrolljs aims to make... Read more
With the wide support of css3 we can use css to do some of the things that could only be done in javascript in the past. Here are a couple of my favorites. Togging an element visibility with :hover Using the pseudo selector :hover, we can show and hide elements... Read more
Staying update is hard. From taking the time to read everyday to finding decent articles its hard to know where to start. So I thought I would jot down a few of my favorite sources for javascript, css, html and design links. Newsletters JavaScript Weekly HTML5 Weekly CSS Weekly The... Read more
I recently gave a talk on javascript templating engines and was able to for the first time record it with google over air hangouts. This was one of the first presentations that I have given over javascript. I find templating a very diverse topic. It seems that there is't a... Read more
In most of the web apps I have written I have had to track / cache simple. It might a jQuery selector or a small group of objects in an array. In some form or another I end up doing something like this to get / set data. appname.data.user[appname.data.state.activeUser].username; Enter... Read more
Recently I ran in to a small bug in Internet Explorer where on an empty cache it would take minutes for script.readyState to equal 'complete' after the script had been successfully loaded from the server. But if you refreshed the page , script.readyState would equal complete on page load. var... Read more
When creating a function in javascript its a good idea to check object the object type(s) of the arguments pasted to function. Lots of times you end up with code looking like this to do this if(typeof(foo)=='undefined'|| foo==''){ ////do something } Earlier this week I ran across Paul Irish's jQuery Anti-Patterns... Read more
I decided to turn an earlier post idea (See http://jebaird.com/blog/using-jquery-create-overflow-menu-seen-google-wave ) into a jQuery UI widget. Its based on the google wave menu. view the demo GitHub repo What It Does It detects which menu items are hidden in the parent element overflow. Takes the hidden items clones them and... Read more
Creating dynamic forms can be time consuming. Hiding one field based on another field value is pretty easy. But when you have to set up a form with many inputs showing and hiding based on may different input values your code can get ugly really fast. formCondtions plugin attempts to... Read more
Being able to re-order table columns has been something that I have always wanted to do. Because of a tables' markup you can't just use the jQuery UI sortables widget. After seeing akottr's dragtable plugin I was inspired to create a jQuery UI widget similar to his plugin. I set... Read more
I have never been a fan of custom scroll bars. Most of the time they are just eye candy and end up getting in the way. That was until I saw the scroll bar in Google Wave. I thought it was the best UI feature in the whole app. It... Read more
I was messing around with the dialog widget trying to figure out away to have it remove its self after the user closed the dialog. I tried listening to the dialogclose event but that didn't work. After playing around with it turns out you can override the default options like... Read more
demo github Setting the default value for an input from markup has been done by ` value=”hello world”. I thought this was true for all input types including, date. It turns out that is not the case. Unless the value attribute is in this format YYYY-MM-DD` the input will not... Read more
Over the past year I have spent a bit of time every week finding interesting backgrounds for my desktop. I was increasingly getting annoyed with the amount of time I was spending on this never ending project. So I decided to roll my own Windows 7 theme with the backgrounds... Read more
I’ve had a Google Chromecast for a couple of months, one of the things that I really like about it is how the time was displayed in the bottom left corner. So I decided to create a set of windows sidebar gadgets that look like they would fit on the... Read more
It’s been awhile since I released a good old fashion jQuery plugin. cloneVal targets :inputs on a form and lets you copy/clone the value to one or a set of target :inputs. view the code in action GitHub A practical use case for this plugin would be an e-commerce form... Read more
Over the past couple of years I have run into several cases were I needed to interact with the dom properties related to scrolling an element. I found my self wishing / searching for library to handle the nuances of the api. So I wrote scrolljs. Scrolljs aims to make... Read more
I decided to turn an earlier post idea (See http://jebaird.com/blog/using-jquery-create-overflow-menu-seen-google-wave ) into a jQuery UI widget. Its based on the google wave menu. view the demo GitHub repo What It Does It detects which menu items are hidden in the parent element overflow. Takes the hidden items clones them and... Read more
Creating dynamic forms can be time consuming. Hiding one field based on another field value is pretty easy. But when you have to set up a form with many inputs showing and hiding based on may different input values your code can get ugly really fast. formCondtions plugin attempts to... Read more
I wanted to decrease the sizes of my pages on my blog with out changing my design. I had been using css sprites and gziped css + with base64 encoded images but due to my design my page size was 1500k on an empty cache. My blog was like this... Read more
Being able to re-order table columns has been something that I have always wanted to do. Because of a tables' markup you can't just use the jQuery UI sortables widget. After seeing akottr's dragtable plugin I was inspired to create a jQuery UI widget similar to his plugin. I set... Read more
I have never been a fan of custom scroll bars. Most of the time they are just eye candy and end up getting in the way. That was until I saw the scroll bar in Google Wave. I thought it was the best UI feature in the whole app. It... Read more
ckeditor is great once you get past the steep learning curve. Lately I have been looking for a way to change the background color of the editor / where you enter in the content on the fly. If you google "ckeditor change background color" you will find that most results... Read more
A few years back I jumped on the netbook craze and bought the Gateway LT21. I was pretty cool to have a small computer that actually had 8 hours of battery life. But in the last year or so, It became un-usably slow running windows / linux. Leaving it to... Read more
I have a Li Lian v2100 plus case that i bought 5 years ago. Everything about the case screams quality except for the exhaust/blower fan( ADDA Model AD2512LB). The first blower that came with the case died about a year after I got the case. After looking for days I... Read more
It’s been awhile since I released a good old fashion jQuery plugin. cloneVal targets :inputs on a form and lets you copy/clone the value to one or a set of target :inputs. view the code in action GitHub A practical use case for this plugin would be an e-commerce form... Read more
triggerAll is a simple plugin that will allow you to trigger all the events attached to an element and or collection (function($){ $.fn.triggerAll = function(){ return this.each(function(){ var $this = $(this); $.each($this.data('events'),function( k, v){ $this.trigger( k ); }) }); } })(jQuery); Read more
triggerAll is a simple plugin that will allow you to trigger all the events attached to an element and or collection (function($){ $.fn.triggerAll = function(){ return this.each(function(){ var $this = $(this); $.each($this.data('events'),function( k, v){ $this.trigger( k ); }) }); } })(jQuery); Read more
Looking back, jQuery UI was my first experience with “web components”. When I first discovered them I as amazed as to how easy it was to setup any widget. Just include jQuery and jQuery UI and just call the widget code. In the exsmaple below, .button() Setting up of an... Read more
I recently started playing around with the new <template></template> tag introduced in html5. On the surface it looks pretty plain, it appears to another template engine. But when combined with the shadowDom API it can be pretty powerful. Take this code example. <div id="target"> <span class="label">Enter your name</span> <span class="name">name</span>... Read more
I wanted to decrease the sizes of my pages on my blog with out changing my design. I had been using css sprites and gziped css + with base64 encoded images but due to my design my page size was 1500k on an empty cache. My blog was like this... Read more
I wanted to decrease the sizes of my pages on my blog with out changing my design. I had been using css sprites and gziped css + with base64 encoded images but due to my design my page size was 1500k on an empty cache. My blog was like this... Read more
Creating dynamic forms can be time consuming. Hiding one field based on another field value is pretty easy. But when you have to set up a form with many inputs showing and hiding based on may different input values your code can get ugly really fast. formCondtions plugin attempts to... Read more
I recently discovered that Jekyll now supports SCSS and SASS files. Which is pretty cool because before you couldn’t use easily use them with github pages. Kevin Sweet the developer who wrote the filters for jekyll 2.3.0 breaks them down in this post In his example you can inline scss... Read more
With the wide support of css3 we can use css to do some of the things that could only be done in javascript in the past. Here are a couple of my favorites. Togging an element visibility with :hover Using the pseudo selector :hover, we can show and hide elements... Read more
Staying update is hard. From taking the time to read everyday to finding decent articles its hard to know where to start. So I thought I would jot down a few of my favorite sources for javascript, css, html and design links. Newsletters JavaScript Weekly HTML5 Weekly CSS Weekly The... Read more
Building a css framework is a bit different than vanilla css. Consider this css block. .box { padding: 5px 10px 5px 15px; } It’s pretty straight forward, there is nothing new here. But if you wanted to override the padding value using shorthand you would have to do something like... Read more
CSS3 pseudo selectors have a lot of power. Lately I have been playing around with :not(), :nth-child() and :nth-of-type(). One thing that I discovered while working on table row striping is that :nth-of-type() and :nth-child() ignore / override :not(). I was trying to stripe all of the odd rows in... Read more
Getting a double border with a different color doesn't leave you with may options.You can use border-style: double or outline: 1px solid blue. But I wanted the double border only on one side, so I decided to play around with the box-shadow rule. Check out the jsfiddle below. I'm using... Read more
Getting a double border with a different color doesn't leave you with may options.You can use border-style: double or outline: 1px solid blue. But I wanted the double border only on one side, so I decided to play around with the box-shadow rule. Check out the jsfiddle below. I'm using... Read more
I recently ditched add block plus for firefox because it was eating my machine alive. I switched to using hostsman witch is a great utility for windows. But I felt that there was a better way to block ads for my entire home network. Since I have a Cisco router... Read more
I have had my Cisco 851w for a number of years most of which I used it as an access point. A couple months back I switched ISP's and was able to use it as my router. It had been a very long time since I had configured a Cisco... Read more
This is a follow up post to useful plugins for Aptana Studio. Since writing that post I have stumbled on a couple other useful plugins / tools I would like to share. Fullscreen I looked for a fullscreen plugin after being enamored with LightTable’s fullscreen feature. This plugin hasn’t been... Read more
Aptana Studio Beginner's Guide by Thomas Deuling covers everything in Aptana Studio from installation to setting up the built in collaborative features. Having used Aptana Studio for the past few years I still found this book helpful. It would have been great to have on my shelf when I started... Read more
I have been using Aptana Studio 3 for the past few years as my primary IDE. But there are been features / plugins that I have wanted to integrate into my setup. Since Aptana is based off of eclipse I thought that finding plugins would be very easy. Turns out... Read more
Looking back, jQuery UI was my first experience with “web components”. When I first discovered them I as amazed as to how easy it was to setup any widget. Just include jQuery and jQuery UI and just call the widget code. In the exsmaple below, .button() Setting up of an... Read more
I recently gave a talk on javascript templating engines and was able to for the first time record it with google over air hangouts. This was one of the first presentations that I have given over javascript. I find templating a very diverse topic. It seems that there is't a... Read more
Aptana Studio Beginner's Guide by Thomas Deuling covers everything in Aptana Studio from installation to setting up the built in collaborative features. Having used Aptana Studio for the past few years I still found this book helpful. It would have been great to have on my shelf when I started... Read more
Software development is hard work. A project takes many turns before it’s pushed live, and sometimes you have to work more hours than you wanted and/or cut corners to hit deadlines. At ONTRAPORT, our busiest time is mid-summer into early October when we host ONTRApalooza, our annual user conference. At... Read more
A friend of my recently sent me this video It got me thinking about how language is everything when it comes to expression of self. And even more so when it comes to development and code. Which led me to this conclusion. Developers and like minded people ruined the English... Read more
In the past few months, I discovered these quotes "It’s much easier to recover from no abstraction than the wrong abstraction." @sebmarkbage— getify (@getify) July 10, 2015 First you learn the value of abstraction, then you learn the cost of abstraction, then you're ready to engineer— Kent Beck (@KentBeck) October... Read more
Back in college, my friends and I would always talk about the latest tech news. We would debate the latest and greatest ideas like which Pentium 4 processor was better. It became a competition of who ‘knew’ the most ‘stuff.’ During one of these pre-class chats, one of the guys... Read more
Early in 2013 Ontraport engineering team decided on a code style guide. After years of everyone coding to their own standard we now have a unified style across all languages. Everyone on the team voted so it was about as fair as it could be. Most of my style preferences... Read more
Building a css framework is a bit different than vanilla css. Consider this css block. .box { padding: 5px 10px 5px 15px; } It’s pretty straight forward, there is nothing new here. But if you wanted to override the padding value using shorthand you would have to do something like... Read more
When I was a kid my mother always encouraged me to try new things. From taking up a musical instrument to playing sports she was always pushing me to explore the world around me. I never understood why. I thought she was trying to get my two brothers and I... Read more
I recently read shame.css by Harry Roberts. I thought it was a very good article and touched on some points that we as developers have to deal with on daily basis. Hacks typically don't have enough visibility in the code base. What if your project spans different languages? What works... Read more
I recently discovered that Jekyll now supports SCSS and SASS files. Which is pretty cool because before you couldn’t use easily use them with github pages. Kevin Sweet the developer who wrote the filters for jekyll 2.3.0 breaks them down in this post In his example you can inline scss... Read more
Just this past week I migrated this blog over to Jekyll from Drupal. I had been using Drupal for the last couple years and I was getting frustrated with how many steps it took to post articles. So I decided to make the switch. Looking that the sparse Jekyll documentation... Read more
After two long weeks, Julia was finally discharged from the University of Iowa Hospitals and Clinics on Thursday May 30th. What a great 2 week birthday gift! The last few days were very busy as all the doctors and therapists were in and out doing their final check ups on... Read more
On Thursday May 16, 2013 at 4:17pm, Jesse and Teresa Baird became parents to a beautiful baby girl, Julia Michelle Baird. She was 6 pounds and 5 ounces and was 20 inches long. She was born at Covenant Hospital in Waterloo, Iowa. Unfortunately we had a sad turn of events... Read more
Staying update is hard. From taking the time to read everyday to finding decent articles its hard to know where to start. So I thought I would jot down a few of my favorite sources for javascript, css, html and design links. Newsletters JavaScript Weekly HTML5 Weekly CSS Weekly The... Read more
Over the past year I have spent a bit of time every week finding interesting backgrounds for my desktop. I was increasingly getting annoyed with the amount of time I was spending on this never ending project. So I decided to roll my own Windows 7 theme with the backgrounds... Read more
I’ve had a Google Chromecast for a couple of months, one of the things that I really like about it is how the time was displayed in the bottom left corner. So I decided to create a set of windows sidebar gadgets that look like they would fit on the... Read more
You can set up any merge tool in git to handle conflicts. When I used SVN, winmerge was my tool of choice. But since switching to git, it left me to seek out a replacement that does 3-way merging. After searching around it seems that kdiff3 is one of the... Read more
Since Windows 7 was released Microsoft has taken down the live gadget gallery making it harder to find quantity Windows 7 gadgets. I still use Windows 7 as my primary OS and I find the gadgets very handy. Every time I have to do a fresh install I find my... Read more
I like to run every day. Here are some of cool things that I have discovered over the years. If you have never used a foam roller you’re missing out. I was having troubles with my lower legs, specifically my achilles was over tight to the point where stretching wasn’t... Read more
You can set up any merge tool in git to handle conflicts. When I used SVN, winmerge was my tool of choice. But since switching to git, it left me to seek out a replacement that does 3-way merging. After searching around it seems that kdiff3 is one of the... Read more
Ontraport / OfficeAutoPilot’s formeditor is pretty powerful, it’s great for creating one off designs. But did you know that you can use it to create themes that you can apply to other formeditor created forms? This setup will work on Wordpress, Landing Pages and plain old html pages. Quick Demo... Read more
A few years back I jumped on the netbook craze and bought the Gateway LT21. I was pretty cool to have a small computer that actually had 8 hours of battery life. But in the last year or so, It became un-usably slow running windows / linux. Leaving it to... Read more
Recently I was trying to get husky using yarn to work on widnows. While I could directly run the commands for the git hooks from the cli, they would fail when husky would try to run them. Here is an example of the console output λ git cm "test /usr/bin/bash:... Read more
Recently I was trying to get husky using yarn to work on widnows. While I could directly run the commands for the git hooks from the cli, they would fail when husky would try to run them. Here is an example of the console output λ git cm "test /usr/bin/bash:... Read more
Recently I was trying to get husky using yarn to work on widnows. While I could directly run the commands for the git hooks from the cli, they would fail when husky would try to run them. Here is an example of the console output λ git cm "test /usr/bin/bash:... Read more
Jesse Baird is a Senior Software Engineer currently looking for a new position. When he isn't working Jesse gets his news fix at npr. He also is an avid runner and loves hitting up the bike trails in and around Iowa City, IA. more