Saturday, October 21, 2017

installing Dell bios update on 64-bit linux

Unlike many motherboard OEMs, Dell releases BIOS updates that can be executed from linux.  Unfortunately, a portion of these updates are precompiled binaries for 32-bit linux only.  Here's how I made the BIOS update work for my Precision T5400.

Get the update:

wget https://downloads.dell.com/FOLDER00493899M/1/T5400A11.bin
md5sum T5400A11.bin
# should be 11a13eae55e01ca5aaadda459b78cf2a
chmod a+x T5400A11.bin

Like many vendors of proprietary software in the world of FOSS, the update takes the form of a short shell script that extracts and unzips a precompiled binary from itself.  All the work is done in that binary.  Unfortunately, when you try to run it under a 64-bit Debian install, you'll get something unhelpful like:

./flash: No such file or directory

So here's the solution to run this binary under 64-bit Debian:

dpkg --add-architecture i386
aptitude update
aptitude install libc6:i386 libstdc++6:i386 zlib1g:i386

Now you should be able to run the update!

./T5400A11.bin

Monday, August 28, 2017

dumping the contents of your netflix dvd queue

That Netflix DVD queue can sometimes get out of hand.  If you ever want to do some data on the contents of your queue, I'm pretty sure they still have an API for that.  But maybe you want to back up your queue just in case, or maybe you want to write a thing to tell you if you're about to spend your slot on crap, or maybe you're thinking about pausing your subscription and want to keep a list of what it was that you wanted to watch.  If you want this information and you want it in the browser console and you want it NOW, here is some jQuery garbage I just hacked together to make your dreams come true.

var all = []; $("#activeQueueItems, #savedQueue").find("*").each(function(i,el){var titlez = $(el).attr('aria-label'); titlez && titlez.includes("Table row for") && all.append(titlez.replace("Table row for", "")); }); console.log(all)

Or, slightly less hideously:

var all = [];
$("#activeQueueItems, #savedQueue").find("*").each(function(i, el) {
  var titlez = $(el).attr('aria-label'); 
  titlez && titlez.includes("Table row for") && all.append(titlez.replace("Table row for", ""));
}); 
console.log(all);

Works in Chrome, if you're using something else then get with the program.  Remove the "#savedQueue" if you only want to see items that are active in the queue (not saved DVDs).  Happy hacking!

Thursday, August 17, 2017

compiling synergy on debian 9 stretch

The packaged version in Debian has always been ancient and terrible, but with the recent release of Stretch, the Synergy devs have yet to catch up.  Here's how to compile and install the latest stable Synergy (1.8.8) at the time of this writing.

  1. sudo aptitude install build-essential cmake libavahi-compat-libdnssd-dev libcurl4-openssl-dev libssl1.0-dev lintian python qt4-dev-tools xorg-dev fakeroot
  2. git clone https://github.com/symless/synergy.git
  3. cd synergy 
  4. git checkout tags/v1.8.8-stable
  5. QT_SELECT=4 ./hm.sh conf -g1
  6. ./hm.sh build
  7. ./hm.sh package deb
  8. sudo dpkg -i bin/synergy-HEAD-stable-c30301e2-Linux-x86_64.deb