Sketches, Code Bites and Toys


What is posted here? Well I have an online portfolio that has all of my fancy-pant art and design work, but I had no place for my mini-projects. Mini-projects and works in progress will be the focus here.

As the tagline reads, this is space is for sketches, code-bites, and toys.

× 2011-07-12

Escaping strings for regular expressions in JavaScript is pretty easy when you know what you’re doing. But say that the input is dynamic, possibly coming from an inexperienced user. That shit has got to be scrubbed! Unfortunately, there is no built in way to do that. Luckily it’s easy enough to add it in yourself.

Comments Off
Tags: , , ,

× 2011-04-14

I’ve got a decent internet connection at home sitting around 15 Mbps down. Not top of the line, but respectable nonetheless.

I have a personal server that I use to store various files that generally range in size from 150 MB to 14 GB. Now if we lived in a perfect world the download would take up as much bandwidth as it can which would have me downloading at around 1.8 MB/s. Unfortunately through forces that I understand to be outside my control I only get about 200 Kb/s.

Interestingly, I can download several files from the same sever concurrently at that speed. This is great when downloading several smaller files at the same time, but rather useless when you’ve got one big one. It doesn’t seem fair.

Comments Off
Tags: , , , ,

× 2011-02-05

CSS3 introduces Media Queries which are an extremely powerful way to customize your site depending on the media that is displaying it.

Some people have trouble wrapping their head around the max-device-width query which is commonly used to differentiate between a desktop and mobile browser. To target CSS for the iPhone you would use (max-device-width:480px) since the iPhone’s screen size is 320px by 480px. Then comes the question “But if the phone is in the portrait orientation wouldn’t the maximum width be 320px?”

Comments Off

× 2009-11-05

This script takes a text file (any text file should) and displays it one line at a time with short delays in between. In other words, you can run this script to make it look like your computer is actually doing something worthwhile.

I had searched around the internet a few times but never really found anything like this, but that doesn’t mean it doesn’t look. Maybe I’m just a bad internet searcher. Script after the jump.

Comments Off
Tags: , , , , ,

‹ Older posts

© 2015 jgillman -¦- Go WordPress! -¦- RSS 2.0 Feed