cjdmax's blog

Racktables 'Free Whole U' patch

Submitted by cjdmax on Mon, 10/03/2011 - 22:16

Racktables is an old-school datacenter rack visualisation script. Doesn't really look like much, but is the (IMHO) most stable solution out there at the moment. The standard rack overview will return the net capacity of a rack, which is not very helpful; we're more interested in how many servers we can add. This function will render how may totally free U are left. The function is modeled on the standard 'getRSUforRack' in functions.php, and is integrated into the racktables interface.php in the same places.

Firefox addons for the win

Submitted by cjdmax on Tue, 07/19/2011 - 19:22

Firefox still is the best browser for powerusers, hands down.

Why yes, I am one for inflammatory statements.

Check out some of my picks

<3 jquery, autotab between fields

Submitted by cjdmax on Tue, 07/19/2011 - 19:22
$("input.ipaddressparts").keypress(function(evt) {
          if (evt.which == '46' || evt.which == '32') {  // dot or space
                  evt.preventDefault();
                  $(this).next().focus().select();
          }
});

This piece of sheer awesomeness will skip to the next input field of a four-input IP address form. The preventDefault() prevents the space or dot from being printed. and the jquery .next command will skip to the next similar input element.

jQuery makes javascript very painless and we love it!

IPv6 on debian

Submitted by cjdmax on Tue, 07/19/2011 - 19:22
Debian syntax for adding ipv6 static addresses to an existing (ipv4) iface (in addition to SLAAC ipv6 adresses (handed out by ICMPv6) which may not be guaranteed to be static). You may not use the eth0:0 alias syntax with ipv6 apparently!
iface eth0 inet static
 # feel free to do a "pre-up modprobe ipv6" if needed
 address xxx.xxx.xxx.xxx
 netmask xxx.xxx.xxx.xxx
 gateway xxx.xxx.xxx.xxx
 up /sbin/ip addr add dev $IFACE yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy/zz

Promote js

Submitted by cjdmax on Tue, 07/19/2011 - 19:22
JavaScript Guide

One of the problems with javascript is that most of the web searches for documentation render bad or sub-par websites on (stuff like w3schools or other less ideal pages). PromoteJS is a mechanism (akin to googlebombing) aiming to enhance the search engine results for oft-used searches for stuff like Javascript, Javascript string and other search options.

The observant might spot that this blog entry itself is an example of this campaign...

Subscribe to RSS - cjdmax&#039;s blog