Bashing up

Here are a couple of useful Bash resources that came upon my radar recently.

First one is Julia Evans’ blog post “Bash scripting quirks & safety tips“.  It’s quite introductory, but is has a few useful tips.  The one in particular I either didn’t know about or completely forgot  mentioned recently is on how to make Bash scripts safer by using “set -e“, “set -u“, and “set -o pipefail“.  These go well with another post of mine not so long ago.

The second is Sam Rowe’s blog post “Advancing in the Bash Shell“, which I found useful for all kinds of navigation and variable expansion in Bash command line.  Especially the bits on searching and reusing the history.

X27 – ultra low light night vision color camera

As someone who works with technology for years now, I might sometimes appear as a “know all, seen all” kind of guy.  But that’s far from the truth.  Sure, there is plenty of technology I know or even slightly aware of.  But there is still a whole lot that blows my mind when I come across it.

Via this blog post, I came across an X27 – ultra low light night vision color camera.  And my mind is blown.  This technology provides high definition, color video images in ultra low light conditions (no moon, overcast).  The level of detail this camera picks up is simply unbelievable.  Check out this video comparing X27 to some other night vision technologies.

The X27 camera takes videos in darkness that looks like they were shot in the daytime. And they’re in color…none of this black and white, thermal, or infrared stuff. The camera was developed for military use, has an effective ISO rating of 5,000,000, and has a comically long name: “X27 Reconnaissance Day/Night high Fidelity true real time low light/low lux color night vision Imaging Security / Multi Purpose camera system”. Pricing information is not available, but I bet you’re paying for every single one of those words. (via digg)

Sure, military is probably the first and only sector that can afford this.  But as with anything, once the technology is available, it will make it’s way down to the rest of us, opening new doors in law enforcement, security, photography, movies and TV, entertainment, health and safety, environment and animal welfare, and other areas.

Super cool stuff!

350+ Data Structure Problems with Solutions

Here is a rather extensive collection of 350+ data structure problems with solutions.  The list varies from the usual searching and sorting of values in an array, to string manipulation, binary logic, matrices and graphs.  No matter how high was your grade for all those Computer Science courses back in college, or how long have you been programming, I guarantee you’ll find a challenge or two in this list.

From a very brief couple of hours look at the list, my favorite ones seem to be around the chessboard problems, such as this chess knight problem for finding the shortest path to destination using a queue.

Network Traffic Control (QOS)

OpenWrt, which is a Linux distribution for embedded devices, website has a really handy HowTo on Network Traffic Control (QOS).

Traffic Control is the umbrella term for packet prioritizing, traffic shaping, bandwidth limiting, AQM (Active Queue Management), QoS (Quality of Service), etc. This HowTo will help you understand and set up traffic control on your router. It is one strategy to address problems caused by Network congestion.

It covers the tc (traffic control) and iptables commands, and much more.