Error

Warning: count(): Parameter must be an array or an object that implements Countable in antispam_user_load() (line 1545 of /var/www/vhosts/cjdmax/web/sites/all/modules/antispam/antispam.module).

Blogs

Ultimate Hacking Keyboard vs Dygma Raise. Split decision.

Submitted by cjdmax on Mon, 03/16/2020 - 18:10

Temp version. no photo's. Nasty layout

There's a reasonably sized group of people on the internet that really love mechanical keyboards, and a small group of people looking for ergonomic keyboards. The groups overlap quite a bit, and there have been some DIY, kit and commercial offerings in the past. People with a passing interest in PC's and/or keyboards might know that almost all conventional keyboard manufacturers offer some kind of split keyboards where the two halves of the QWERTY keyboards have been split and angled slightly inwards, but are still in one piece. These keyboards often also offer a slight tent, where the middle of the keyboard (on the split) is higher than the sides, for better ergonomics. There are various commercial offerings from companies that specialize in ergonomics (Kinesis) and there's the slightly unconventional Matias Ergo pro, which does come with mechanical switches. There have been split keyboard kits like the Ergodox, with some or all assembly and soldering required as an ortholinear key layout (no overlap or bricklaying pattern between keyboard rows).

Vim conceal passwords

Submitted by cjdmax on Sun, 03/15/2015 - 15:52

A short howto to get Vim to conceal passwords, while still having them selectable and copy-paste-able. You can get the passwords visible by visual-selecting them in Vim.

YMMV how well this works for you and your terminal. Please (auto)encrypt and (auto)versioncontrol your passwordfiles, to prevent mistakes. Please note your passwords may stick in clipboard managers like Klipper.

This solution uses vim modelines, syntax overrides and the conceal function in Vim.

libnss-mysql and segmentation faults

Submitted by cjdmax on Mon, 12/10/2012 - 23:49

If you're using the excellent libnss-mysql (also known as libnss-mysql-bg on Ubuntu) please, please, PLEASE read the documentation provided at their documentation pages.

You'll also note the WHERE clause contains a '%1$s'. This '%1$s' is where the system will insert the username being searched for. For getpwuid, this is a '%1$u' because we're searching based on a number (%1$u) rather than a username/string (%s). It's important to keep these correct, else things will start crashing.

If you were, for instance, to write your own SQL queries for the getpwuid portion of the config, you may make a terrible mistake. I did. You will hate yourself if you don't catch it. Everything will segfault. If you were morally so inclined this could be a 'landmine' you could leave for the next sysadmin. It is truly hell. Your initramfs generation will segfault, your ls -al will segfault... Everthing turns to shit.

Ubuntu 11.10 upgrade and kexec

Submitted by cjdmax on Thu, 04/26/2012 - 16:49

When upgrading Ubuntu (Oneiric Ocelot) 11.10 to (Precise Pangolin) 12.04 DO NOT reboot using kexec; this will lead to slowdown, lag, choppy video, keyboard and mouse movement. Do a complete shutdown -hP now shutdown and cold-boot when the upgrade program tells you to reboot.

Software versions: Kubuntu 11.10 i386 with the KDE 4.8 PPA's, upgrading with console do-release-upgrade -d

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.

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...

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

<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!

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

Subscribe to RSS - blogs