Followed the common advice from the Internet to disable IPv6 by adding the following to /etc/sysctl.conf:

# disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

However, according to ip addr show, there were still 9 inet6 addresses for interfaces like eth0 and wlan0:

ip addr show | grep -c inet6
9

Read the rest of this entry...

BIOS flash I've accumulated a few Micro SDHC memory cards for filming with GoPro Hero 4 Black and a Panasonic HC-V750, and thought I'd do a quick benchmark to see how they stack up relative to marketing claims and prices.

All but one of the cards below claimed UHS Speed Class rating of 3, according to the little "U3" symbol on them. Only the Sony was U1.

Read the rest of this entry...

Problem

When laptop lid is closed, system enters sleep or hybernate mode. This is a problem for me because I'm using the laptop as a mini server at home.

In addition, after entering this suspended mode, the system is unable to recover after lid is open, so even if I used it as a laptop, and didn't mind it entering suspended state, the freezing would still be a problem. This happened with BIOS A05 and with the latest A11.

One workaround could be to just run it with the lid open all the time, but then the keyboard collects dust, so I don't like that.

I know there's an option to control this in System Settings > Power, but this laptop is running a server without a GUI.

Read the rest of this entry...

BIOS flashI've a got a Dell Mini Inspiron 1010 that came with BIOS A05. While troubleshooting an ACPI problem, decided to update it to the latest, which was A11.

Because Dell doesn't care about Linux users, the BIOS update process under Linux is a little more difficult -- but fortunately still possible.

First, I attempted BIOS update using the FreeDOS Live CD based method I previously wrote about.

Unfortunately, that didn't work because the BIOS update file R246063.exe downloaded from Dell, would refuse to run under FreeDOS with:

This program cannot be run in DOS mode

Read the rest of this entry...

graphIn 2013, following a problem with the Akismet service, I decided to implement two additional comment spam protection layers to complement Akismet.

Some of the blogs at work have been getting hammered by comment spam (they use Akismet exclusively), so I went to check how my hybrid solution has been doing, before I again suggest this setup at work.

Read the rest of this entry...

This script is a shorter version of the shell script to trim a video clip with avconv, ffmpeg or mencoder.

Main difference is that instead of start/stop times in HH:MM:SS format, which are tedious to type, it just needs start time, defaulting to 8 sec duration (optional script arg allows custom duration).

The reason for this version is that, when making clips out of wakeboard videos, I typically just to need to extract the trick, which, from the cut in, execution, landing, and cut out, lasts about 8 sec. Less typing, means I can make clips faster. In some cases, I want something other than 8 sec, so the script allows custom duration specified as an optional last arg.

Here's the script:

Read the rest of this entry...

This script is an updated version of the Shell script to trim a video with mencoder or ffmpeg.

Main difference are:

  • Adds support for and defaults to avconv (but still supports ffmpeg and mencoder).
  • Uses simpler code to calculate clip duration from start/stop times.
  • Accepts period (.) in addition to colon (:) as the HH:MM:SS separator in start/stop times. Dots are much quicker to type, which is nice when creating lots of clips.

Here's the script:

Read the rest of this entry...

TL;DR: I fixed my problem by using Thunar instead of Nautilus.

Nautilus devs, please make time style display configurable!

What's my problem?

At some point, file time stamp display in Nautilus (aka Files) in Ubuntu started insisting on a relative time display, where depending on the file age, the time stamp will either just show time (e.g. 12:31), or just date (e.g. Jan 1), or date and year (e.g. Dec 25 2013).

Read the rest of this entry...

Found this cool site that aggregates HDD and SSD prices from Newegg on a daily basis and lists by price per terabyte: http://edwardbetts.com/price_per_tb/

Unfortunately, it doesn't allow filtering or sorting of the data, so here are some quick and dirty examples.

int_hdd=$(links2 -width 200 -dump http://edwardbetts.com/price_per_tb/internal_hdd/)
ext_hdd=$(links2 -width 200 -dump http://edwardbetts.com/price_per_tb/external_hdd/)
ssd=$(links2 -width 200 -dump http://edwardbetts.com/price_per_tb/ssd/)

Show only 6TB disks:

grep 6TB < <<"$int_hdd"
     $38.33 $229.99     6TB Open Box: WD Green WD60EZRX 6TB 64MB Cache SATA 6.0Gb/s (0 stars)
     $44.00 $263.99     6TB WD Green WD60EZRX 6TB 64MB Cache SATA 6.0Gb/s (4 stars)
     $44.33 $266.00     6TB WD Red WD60EFRX 6TB 64MB Cache SATA 6.0Gb/s 3.5" NAS Hard Drive Bare Drive (4 stars)
     $45.00 $269.99     6TB Seagate STBD6000100 6TB 128MB Cache SATA 6.0Gb/s Retail Kit (4 stars)
     $50.00 $299.99     6TB HGST Deskstar NAS H3IKNAS600012872SN (0S03839) 6TB SATA 6.0Gb/s 3.5" High-Performance Hard Drive for Desktop NAS Systems Retail Kit (4 stars)
     $50.00 $299.99     6TB WD Purple WD60PURX 6TB 64MB Cache SATA 6.0Gb/s 3.5" Surveillance Hard Drive (5 stars)
     $72.67 $435.99     6TB Seagate ST6000NM0024 6TB 128MB Cache SATA 6.0Gb/s 3.5" Enterprise Hard Drive Bare Drive (5 stars)
     $83.33 $499.99     6TB Seagate ST6000NM0054 6TB 128MB Cache SAS 12Gb/s 3.5" SED Enterprise Hard Drive Bare Drive (0 stars)
     $88.33 $529.99     6TB Seagate ST6000NM0104 6TB 128MB Cache SAS 12Gb/s 3.5" SED-FIPS Enterprise Hard Drive Bare Drive (0 stars)
    $121.67 $729.99     6TB HGST He6 HUS726060ALA641(0F20572) 6TB 64MB Cache SATA 6.0Gb/s 3.5" Enterprise Hard Drive (0 stars)

Read the rest of this entry...

For some of my LXC containers, I'm allocating a reserved private IP and need to generate a reasonably unique MAC address that's calculated from the container's hostname. As is LXC's default, I'm using the OUI that belongs to Xensource, Inc (00:16:3e).

Here's a Bash function I'm using:

GetMAC()
{
  if [ -n "$1" ]; then
    OID="00:16:3e"
    RAND=$(echo $1 | md5sum | sed 's/\(..\)\(..\)\(..\).*/\1:\2:\3/')
    echo "$OID:$RAND"
  else
    echo "ERROR: please supply hostname to create MAC address from, e.g.:"
    echo "       $FUNCNAME myhost"
  fi
}

Code in action:

$ GetMAC myhost
00:16:3e:e0:04:92

Useful references: