Skip to main content

Posts

If you want a life-changing DVD...

...& live in Perth, Bunbury or Albany (WestAus) — or points in between — send an email to me at cyberknights com au & I'll see if I can arrange for one to lanf in your hand (or mailbox, or whatever). No, it’s not a technical DVD — at least, not in the sense of being connected with IT, computers or electronics. You push it into a DVD player & learn some stuff. Amongst other things, you can kiss cancer, diabetes & quite a number of “modern” afflictions goodbye.

Problem? What problem?

I was handed a DVD (on the topic of Jebel Al Laws ) which was to be copied, but the copying machine had refused because the disc was “encrypted.” Curious, I poked it into a DVD drive, cranked up k9copy (licensed under GPL2 , yes FOSS does rock!) & 20 minutes later am watching the copy on a standard DVD player. Was there a problem?

TP-Link ADSL router box includes GPL on paper

As I was re-organising items around my house, I extracted the manuals for my TP-Link ADSL modem from the box, plus a phone cable (which I added to my cables drawer), I discovered a paper copy of the GPL . One more small piece of evidence to provoke a re-think amongst those who refuse to accept that Free Software could possibly work. Happily — like some other significant items — the concept does not require their acceptance (or understanding) to exist & to operate.

Proprietary OSes don't come with strace

Many proprietary operating systems are designed for the lowest common denominator. Only. This makes doing anything constructive with them an uphill trip in both directions. Even if you spend money on a compiler which runs under those OSes, do they include strace ? How difficult is it to chroot before executing a process? What enhanced security facilities (like Mandatory Access Controls) can you apply to an individual process? Where is the setenforce command? Most users don't even know what these things are, let alone whether their OS has them, which for the majority of cases is just fine. They don't need to know, For people who do know what these things are, their absence can make life Hell (even if only in limited situations & for limited times, nevertheless Hell). In the case of F/OSS-style software, they're included because the people who use the software wrote the software. EVeryday users don't even need to know that these tools exist. Simple?

Were you a Lego kid? Or Meccano?

If you were, you’ve gotta like Unix (in this case, Linux) ’coz that’s what it’s all about. Case in point is an app I’m working on (supposedly enhancing, in practice damn near rewriting) written in C which stores data into flat files. No indexes. It just writes a gazillion struct whatever; records straight into the data file. The current problem is that as data tots up, it gets very slow since it processes each data file serially when reporting, & if there’s cross-references it serially scans the related (thankfully small) data file for each record, to fetch the required text. There’s a background problem in that multiple users running the same app (which must be done on the same computer) have no clear way of avoiding collisions, with the inevitable result that the second (or successive) user requiring access to a record must wait until the earlier user(s) have finished with it & if the first user crashes the unlock() never happens so...

Yet another reason for preferring Linux

Fire up machine unused for about a year, currently running Jaunty version of Kubuntu. Hmmm... do-release-upgrade & 25 minutes later we’re running Karmic. In MS-Windows-equivalent terms, we’ve just upgraded from XP to Vista in 25 minutes, seamlessly, without having to agree to any (or any more) mind-bendingly-control-freak licensing terms or click  [ OK ]  on a thousand tedious dialogue boxes (if I had written that S/W, there would exist a  [ Maybe ]  button there between that &  [ Cancel ]  plus an  [ It’sAllOK ]  button, AKA  [ JustGetOnWithItNow ]  ). Next month, this machine will become Lucid.

FOSS from wall to wall

Here we have an application, written for SCO Unix so writing printer output to a specific device interface in a format intended for a particular brand of dot-matrix impact printer. Impact printers are so yesterday, & SCO Unix is so last decade, what can we do...? Get it to write into a temp file instead, with obvious <FLAGS> where a change in font size or intensity or whatever is required, then spool the result. That's a step forward, now it will work on nearly any printer (thank you, CUPS ), kind of. Second level, feed it to htmldoc on the way to the spooler. Now stuff like <B>bolding</B> works! However... these 132-column-wide reports not look so hot on an A4 page... No worries, print on A4 Landscape, then pdf90 that (from the pdfjam toolset) to spin it out & make it good.

Congratulations to Miss L for scoring...

...a spotless townhouse in South Perth for $50,000.00 off from a reluctant seller simply by waiting for one day after the neighbouring townhouse sold, then placing a proposal for $5,000 higher for a limited time as per advice from my brother-in-law. Total elapsed time: one week from 4sale sign up. Yes, the real estate market may be about to fall into a deep hole, but the place is securely hers now. This is far from the most awesome thing she’s had happen over the last handful of months. Go, team!

Moore’s Law

My first PC: 486DX2 66Mhz, 16MB of RAM, 320MB of hard disk in two drives, removable storage 1.4MB 1.5" floppy disk at $2 each. PC I’m finding a home for now (discards from TAFE & high schools intended for a primary school, this one was missing several drivers for devices under MS-Windows XP but runs Kubuntu just fine): Pentium4 2×3000MHz, 1024MB of RAM, 80,000MB of hard disk in one drive, removable storage 4400MB DVD burner with blank discs at $0.30 each or 2048MB flash stick at $6 each. Smallest PC from the set (ditto for drivers): Pentium3 1000MHz, 256MB of RAM, 20,000MB of hard disk in one drive, removable storage 770MB CD burner with blank discs at $0.30 each, plus 4400MB DVD reader, or 2048MB flash stick.

Racial Relations

I have a “Kiwi Chick” friend who is half Maori half Scottish; another who has a German Dad & another from Kent, three half-Italian children (two in Port Hedland, one en Italia), teaches Italian at two local schools; another US Citizen who has an English surname but French, German, Norse & Pawnee-Indian ancestors; a Thai citizen who has a Thai mother & Phillipino father; I am mostly British Australian but part Austrian & a small part Aboriginal (which really means Phœnecian) & born in Canada. It seems oddly appropriate that I paid AUD$ to a .com.au company yet had the resulting business cards airmailed from Holland.

In case you’ve forgotten that MS-Windows is a negative-pressure situation... *

OpenOffice 3.2.1 is failing to install on a nearby laptop as the Microsoft Visual C++ sub-install on Vista gronks out with a bizarre error which may on Windows 7 (Vista SP- MAXINT ) indicate a Registry entry set to too low a value. There’s no such registry entry here, but adding it & maxing it out has no effect at all. OpenOffice 3.2 had no such problem on the same machine. Said machine had another person (hereinafter PassionFingers ) left logged in as an Administrator create themselves a new user, & in passing grant themselves access to every file under C:\Users — not the most private situation for the other users of the machine. * That is: it sucks.

Simplifying things by complicating them

I have an application to modify which wants to go from a hard-wired Wyse VT-100B-clone character terminal emulation to a GUI interface with all stops in between, plus wants to go from spitting escape-sequences at a specific model of dot-matrix impact printer to spitting A4 pages out of name-your-printer, plus wants to go from unindexed flat (fixed-with binary records) data storage to an SQL backend (probably PostgreSQL to start with). How do I do this, step by step, so I can continue to validate the functionality of the application at each step? Feature Set One: wrap all of the terminal I/O in a standard set of functions; then figure out how many pixels wide/high a bog-standard Courier (fixed-width) character is at a standard scale (12 point?), multiply the text coordinates by those factors in the top-level code, then (when addressing a text screen) divide the resulting coordinates by the same factors before cramming the result down ncurses’ throat. Feature Set Two: wrap all of ...

Nasty trick for PortForward/DMZ on a TP-Link TD-8810 ADSL modem

You need to remove the (default 3x) "Bridge" entries in the DSL settings before a NAT entry will appear in the Advanced Settings menu, through which you can then configure Port Forwarding or DMZ... & a Port Forward rule which alters the port numbers en passant has yet to work for me — so, if you want SSH on port #2222 instead of #22, add "Port 2222" to your /etc/sshd_config file on the server, restart sshd, then configure the modem to port-forward TCP/2222 to the server concerned without altering the target port numbers.

YouTube links on download list script

Still a little clumsy, but... #!/bin/bash arg=$(echo $1 | sed -e 's/v=.*$/v=/') if ! [ "$arg" = "http://www.youtube.com/watch?v=" ]; then     echo "Not a YouTube URL: $1"     exit 1 fi target=$(echo $1 | sed -e 's/^.*v=//') wget $1 -O /tmp/fetched_from_youtube.data # @@@ below is (all on one line, blogger fails to handle well): # if($1 == "-" && $2 != "") { #   sub ("^[^A-Z]*",""); #   sub("\\(.*\\).*$",""); #   gsub("[[:punct:]]",""); #   sub(" +$",""); #   gsub(" +","_"); #   sub("_\\.","."); #   print $0; # } title=$(gawk '/ / { x=0; } x > 0 { @@@ } / / { x=2; }' /tmp/fetched_from_youtube.data) rm -f /tmp/fetched_from_youtube.data python youtube-dl.py $target ffmpeg -i ${target}.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${title}_${RANDOM}.mpg rm -f ${target}.flv exit 0 ...it works ...

Swimming up a waterfall...

Only one message in 56 (1.8%) survives my spam filtering (harsh PostFix rules plus minimal content filters), yet I still get about 200 junk messages each day. It's a pity that the only real alternative is positive ID of the sender, which of course traps you into one of the global ID systems run by the über-control-freaks who intend to run everything their way only... & historically speaking, zero of the ID systems put in place have benefited (or really been intended to benefit) those so IDed.

Adding YouTube watch?v= links to auto-download

The linked chunk of Python does the job well... but leaves a .flv file with a crypto-looking name. This chunk of shell script ( $1 is the full YouTube URL, as in http://www.youtube.com/watch?v=XYZZY123abc or whatever) hauls out the video title: wget $1 -O /tmp/fetched_from_youtube.data name=$(gawk '/ / { x=0; } x > 0 { if($1 == "-" && $2 != "") { sub ("^[^A-Z]*",""); sub("\\(.*\\).*$",""); gsub("[[:punct:]]",""); sub(" +$",""); gsub(" +","_"); print $0; } } / / { x=2; }' /tmp/fetched_from_youtube.data) rm -f /tmp/fetched_from_youtube.data The title is savagely pruned to exclude most things which would fail as part of a filename. Experiments will happen tomorrow AM, but I’m guessing that something like this would do the appropriate conversion/renaming: arg=$(echo $1 | sed -e 's/^.*v=//') ffmpeg -i ${arg} -ab 56 -ar 22050 -b 500 -s 320x240 ...

How to use your unlimited quota 2AM-8AM

Fun with BASH. Disclaimer: this may contain typoes, thinkoes, etc. Use (or don’t use) entirely at your own risk. The intent is to be educational here rather than subject to chapter-&-verse unquestioning acceptance. If the clock on the computer running this is inaccurate by more than five minutes, the downloads may (partially) take place from your monthly quota (in which case install rdate & aim it at a suitable time server, then install/use hwclock to update the PC’s battery-backed clock). Behold, the grabqueue.sh file: #!/bin/sh for list in pending/*; do     N=$(wc -l $list | sed -e 's/ .*$//')     for url in $(seq $N); do         L=$(tail -n +$url $list | head -n 1 -)         if [ "$L" != "" ]; then             wget -c "$L"         fi     done     rm -f $list done rm -f /tmp/grabqueue.pid Run this (in cron) at 02:05 (a little ...

BigPong Mobile Internet epic fail

Finds the modem, connects (with the correct numbers, so not just the modem talking to itself), gets PPP comes up (CHAP succeeds, or PAP does if I use that instead) handed 10.11.12.13 & 10.11.12.14 as DNS, pause 2 secs, “Modem hangup.” EVERY TIME What The Flock?