Skip to main content

Posts

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?

Child-rearing tip II

Freedom of choice is massively important to your child. That doesn’t imply that you should go insane & let them wander around totally uncontrolled. That does mean that as they understand that their opinions & actions are truly important (will change planned actions) to you (& so to others), they deduce that they themselves are important, so what they say & do becomes important to them, they mysteriously become responsible & considerate. To mention that this cues them up well for their teenage years & beyond would be the understatement of the century. You avoid all manner of potential trauma, such as conditioning them into Passive Aggression or Narcissism , or allowing them to slip into Karpman’s Drama Triangle habits. Quite aside from the outright material costs which will inevitably be incurred in dealing with the physical aspects of such traumatic outcomes, you will raise a child with genuine self-worth rather than hyper-inflated egotism (which ...

Child-rearing tip

If you like seeing your 10yo boy totally fascinated, hand him a headset plugged into a copy of Audacity & stand clear. (-: Depending on personality, that’s likely to work well for similarly-aged girls too, but the technological aspects of the experience seem to absolutely fascinate boys... & it is a gender thing, doubters are urged to watch families in shopping centres: the boys will be playing with a gadget, the girls will be on the other side of the shop chatting with someone they’d never seen before. While in the topic of shopping centres, if you’ve ever wondered why young children fuss so much while shopping, mentally place your face an arm’s-length above the floor & picture what the child can see. Underneaths of shelves hardly counts. You begin to understand why they like sitting in (or swinging from) the trolleys so much more. (-:

BigPong Mobile Internet insanity

The modem sticks (different labels, identical USB IDs) would not work in Karmic Koala Kubuntu, work flawlessly under Lucid Lynx... in the sense of connecting & walking into PPP negotiation... but the modem hangs up after 2 seconds. No DNS acquired, or even an IP address. No errors from pppd at all, just the hangup. I’m typing this in from a Mobile Internet connection via a Huawei stick on Virgin (physical carrier is Optus), which has worked flawlessly from the first instant (works all the way from here (Albany) thru to Williams (almost Crossman River), then from just before Yule Du Roadhouse & all thru Perth... oh, & in Cuthbert, Elleker, Denmark, Kalgan...) What the faulk...? Any constructive ideas most welcome. Comment here or email myself @ cyberknights·com·au .

Why OpenSource works so well

“The study [...] shows that cooperation is contagious. This comes from behavioural researchers, & in our eyes gives scientific proof that enlightened altruism, such as is found is open source projects, is real & pays off.” — that’s a good comment on the article ( linked here ) made at The Inquirer .

Bizarre printer issue solved

Plug hp Deskjet F2480 printer/scanner in, it prints out an alignment sheet, feed it to the scanner, hit the Black Copy button & it makes a copy if it — & in the process recalibrates the print-heads a little. But it won’t print anything. The print job takes about as long to fail to print as it would do to succeed in printing, with no action at all in the printer, & no errors thrown either. D’oh? It turns out that the nearest PPD file (for the Deskjet F2200 series) is not near enough. The PC is feeding the entire document (rasterised) down the USB cable, to the printer, which simply, silently throws it away. Using the name of the F2200 PPD file & altering it to be an F2400 PPD file, I search to discover the ferpectly correct PPD file tucked away in a package archive for some random Linux distribution... which happily includes the ability on-site to display the contents of the package & download individual files from it. Done. Fire up web browser, aim ...

Instant MicroPhilosophy

If I don’t recognise that I have/am a problem, so refuse to “own” it, I can’t change it — it will go on, interminably. This is why I always welcome (constructive) criticism, no matter how painful it may seem at the time. The number of people who’ve been recorded as entering remission from a particular common kind of Personality Disorder without first admitting that all of there problems are the result of their own choices & their own actions: zero . That makes it evident that there’s a hard practical outcome available from at least some feelingy/opiniony things. Sooner or later, it becomes evident that you cannot actually change other people (without constant, outright, physical compulsion — a process I have less than no interest in), only they can change themselves. They may feign change (to please you, to duck unpleasant expression, to weasel something out of you which would otherwise remain unavailable to them), but they will not...

Insane printer pricing

I needed a new black cartridge for my printer, which was going to cost $26. Ink refill systems have produced... debatable results. 3 rd -party hp #60 cartridges (Calidad etc) aren’t available. So I soldiered into Hardly Normal yesterday (one of the few times I’ve had actual money over the last weeks) & bought a printer/scanner (with 2 cartridges) for $29. Even if they’re half-full cartridges (they should say so; IOW if they are worth in principle $13 each), that’s still a printer/scanner for $3. In one hand, I have two small black boxes with a scattering of electronics & some ink. In the other I have a large black box with two identical small boxes, a sheet of glass, much mechanical stuff, no significant difference in price. Is that a sane thing...?

Telstra’s still able to passionfinger things decades later...

In order to get ADSL here, I need to have a Telstra-based land-line, because all of the other ISPs have to work through GiganTor’s DSLAMs. Having Verizon start a retail business in Aus would teach T all about monopolies, as they have 40 million customers in the USA alone... It seems that GiganTor ain’t letting them use ADSL2 mode on the same DSLAM, either, as the previous owners of this house had BigPong ADSL2, but crew like TPG will only quote on ADSL1 speeds. When I hit my mother-out-law’s house in December 2007, T had trapped a Zambian student staying there with a $17/month ADSL plan... 256/64kb with a massive 200MB a month quota. When he’d blown the quota (pretty much inevitable) & been billed for the excess & complained, he was told (words to the effect of) “if you had a real plan, you wouldn’t be billed for the excess so readily” so they upsold him to a $75 512/128 plan with a handful of gigabytes a month in quota. I switched that...

Why PuTTY is good even for TelNet

It can send keepalive traffic, which prevents the connection from being dropped by masquerade (NAT) network transitions or inattentive WiFi links while you’re grabbing a cuppa; It runs on just about any platform so you only need one (1) set of instructions for all users; It’s quite flexible about window setup (especially compared with (say) xTerm or Konqueror, but don’t even ask about operating through CMD.EXE) & the keystrokes can be individually configured; When invoked from a command line, one can simply name a pre-configured set of connection parameters rather than adding a bazillion litle options for this or that parameter (& then forget one detail); It’s simple to configure a live CD to autostart straight into PuTTY, making a simple, robust, Thin Client (Twiggy, eat yer heart out).

Reverse Engineering

Twice now in a few days, the docco has been useless, but vivisecting running programs has worked. In the first case, I was using an app to turn a bunch of slideshow-style images into a DVD, with a talk track running under it. The initial application was childrens’ stories. The app was quite clumsy, forex it would only allow one to adjust the length of time each slide remains in whole seconds, & each slide (duration, transition, transition-speed) had to be adjusted manually (GUI interface). Each slideshow had to be redone from scratch (that is, change a detail on one image, need to reload all images & reconfig each time, sigh). So I ran a bunch of ps commands ( ps wwwwaux >filename1.log ) & captured copies of some of the (temporary) config files it made to run the app, now I can select slide times to the nearest millisecond (real-time accuracy is probably about 40ms) & rebuild the slideshow from a simple bash script. I made the slides by scaling photos to NTSC size...