Fun Twitter Accounts for Computer Geeks

Computer geeks need a good laugh sometimes, and there is no better place than Twitter. Twitter is a gold mine of funny accounts that reach all parts of life and work. Either it's an account about an inexperienced web designer that tweets out all of the things you did the first year on the job, or a server that is so depressed because the system administrators have no idea what they are doing.

C Get MP4 Duration

I was recently working on a program that needed to get the duration of MP4 files and I really didn't want to call an external program like ffprobe and parse the output. The code as it's currently standing is below, but maybe the information along side it may be more useful. Now, this code isn't 100% accurate and I coded it only for speed, lower IO usage and the videos I had to parse all were encoded under the same conditions.

PHP - Check if Production or Sandbox

When developing a site, it's usually best to work on it on a local sandbox (development) server. This will allow you to quickly test the site without having to upload the files. Also, when working on a sandbox server, you have full control of the software that is running. This lets you test the code on various platforms, servers, PHP versions, and all sorts of other stuff.

Solve JavaScript Scroll Event Delay

JavaScript is one of those languages that has a lot of quirks. One of them that I recently ran into is how the scroll event isn't triggered until after the page scrolls. You probably will notice this being a problem on a few sites that have sticky sidebars and headers. A sticky element is an element, such as a sidebar, that scrolls with the page and is always visible. If you notice that the sticky element lags behind by a fraction of a second when you scroll giving it a jittering effect, that site is victim to this JavaScript "flaw."

Linux Mounting Flashdrive Twice

I have once again started using Linux while working away from my main office. And it seems that every time I start using Linux after a break, I come across an issue that I have to resolve. I shouldn't really complain though since it does give me something to write about. This time was a fairly odd issue with a very simple fix. Whenever I would plug in my flash drive or external media (such as a hard drive), my operating system would mount normally and show the Desktop icon, but the flashdrive appeared twice under "Devices." For me, I see the "Devices" when looking at folders on the side pane.