ifttt & box drive my desktop backgrounds … with a little cron happiness

I love that OS X lets me change my background on a schedule (I use every 30 minutes now).

But I don’t like having to find pictures to populate my desktop menagerie with.

Enter completely SFW backgrounds via RSS feeds!

Using IFTTT, I watch for new items from a variety of daily photo feeds, and upload the new items to a folder in my Box account. I have that folder set to be the source for my desktop backgrounds, and bingo bango we have automated new images coming to enjoy!

The recipe I’m using is available for you to grab here. (I have several running, but you can use any RSS feed you’d like.)

Also, to ensure I don’t end up with duplicate images (eg from the Bing images feed), I have the following running as a cron job (thanks to Unix.SE for helping me figure it out):

md5 -r * | sort | awk 'BEGIN{lasthash = ""} $1 == lasthash {print $2} {lasthash = $1}' | xargs rm

That script removes any files with duplicate MD5 sums from the folder I keep the images in (note – you should put the actual path to your folder in your cron job).

March 26, 2015 · antipaucity · No Comments
Tags: , , , ,  · Posted in: fun, technical

seems i’m not the only one who thinks apple could make cars

Dallas News ran a story recently on Apple being positioned to be a car maker.

Their reasoning:

  1. Cash (~$180B)
  2. It’s “ultimately” mobile
  3. They have “car guys” already
  4. Strong retail network
  5. They’re already global

I think it more likely they’d buy an existing manufacturer, and then Apple-ify them – but the arguments are strong that an Apple Car will be here sooner rather than later.

March 16, 2015 · antipaucity · No Comments
Tags: ,  · Posted in: commentary

my tech predictions for 2015

I put these up as a comment on Cringely.com – but they deserve sharing here, too.

In no particular order:
AIX EoL’d
HP-UX retired
Itanium EoL’d (perhaps on an accelerated schedule)
– Solaris truly open-sourced / abandoned by Oracle in favor of OEL
– HP spins-off more business units
– IBM loses 25-35% of its value – and spins-off / sells more business units to make Wall Street happy
– POWER continues to slow; IBM doesn’t understand it needs to stop putting so much money into it until all the engineers have been fired
Z/OS systems grow dramatically – the only place IBM makes *more* money
– people finally realize “cloud” isn’t a “thing” – it’s just renting crap when you need it (perhaps from yourself (private cloud)) and giving it back when you don’t
cloud hosting providers cut prices so things like AWS instances are no longer more expensive than dedicated hardware (see eg http://benmilleare.com/how-shaving-0-001s-from-a-function-saved-us-400-dollars)
– enough of the Old Guard hits retirement age that New School tech can finally make big inroads into stodgy businesses and government (automation, cloud, *aaS, etc)
– buzzword-compliance becomes necessary even for mom-and-pop shops who don’t have computers
Android 6 brings native, “real” 3D to cell phones
– … and iOS 9 makes it look “good”
– there’s a new MacBook Flex that offers touchscreen, a fold-flat-reverse form factor, and 12 hours of battery life; the iPad 5 is the first 5K resolution tablet, with a full day of battery life
– Max OS 10.11, aka Denali, allows users to run iOS apps via a “fat binary” model (harking back to the shift to PowerPC from 68k and then again x86 from PowerPC)
– Apple announces the first non-x86 Macs (starting with the Flex)
Apple buys a car company in cashPorsche or Hyundai (Hyundai would be the smart move – get more electronics manufacturing capability in-house; spin-off heavy industry wing)
Tesla introduces a model that non-millionaires can afford – bringing snazzy competition to the Volt price point
SpaceX sends a mission to Venus, and another to Mars
Square opens an online bank
Uber and Lyft grow, win cases against taxi companies – and local competition pops-up all over the country
– several major metro areas across the US all enter the “gigacity” club
– … but it’s led with smaller metro areas (like Chattanooga has already done)

February 12, 2015 · antipaucity · One Comment
Tags:  · Posted in: commentary

merging centos iso images

Thanks to @Anon on Unix.SE for the pointer on how to do this. And to @Andy‘s comment on @mmckinst‘s answer for the warning about additional packages you may need.

As my three readers know, I run a CentOS mirror. One of the idiosyncrasies of CentOS, like its upstream RHEL, is that DVD ISOs aren’t always just one image – for example, the 6.6 x64 image comes on two ISOs. I suppose this has something to do with the “normal” or “simple” capacity of a DVD disc, but it’s annoying.

Enter the mkdvdiso.sh script (original found here) from Chris Kloiber & Phil Schaffner.

The process I used to combine these two ISOs into one is as follows:
yum install isomd5sum createrepo mkisofs
mkdvdiso.sh /full/path/to/original/isos /full/path/to/destination.iso

For posterity, and in case the CentOS wiki dies, below is the mkdvdiso.sh script:

#!/bin/bash

# by Chris Kloiber 
# Mods under CentOS by Phil Schaffner 

# A quick hack that will create a bootable DVD iso of a Red Hat Linux
# Distribution. Feed it either a directory containing the downloaded
# iso files of a distribution, or point it at a directory containing
# the "RedHat", "isolinux", and "images" directories.

# This version only works with "isolinux" based Red Hat Linux versions.

# Lots of disk space required to work, 3X the distribution size at least.

# GPL version 2 applies. No warranties, yadda, yadda. Have fun.

# Modified to add sanity checks and fix CentOS4 syntax errors

# TODO:
#   Add checks for available disk space on devices holding output and
#       temp files.
#   Add optional 3rd parameter to specify location of temp directory.
#   Create .discinfo if not present.

OS_VER=\
$((test -e /etc/fedora-release && rpm -qf /etc/fedora-release --qf "FC%{VERSION}") \
|| (test -e /etc/redhat-release && rpm -qf /etc/redhat-release --qf "EL%{VERSION}") \
|| echo OS_unknown)

case "$OS_VER" in
  EL[45]*|FC?)
        IMPLANT=/usr/lib/anaconda-runtime/implantisomd5
        if [ ! -f $IMPLANT ]; then
            echo "Error: $IMPLANT Not Found!"
            echo "Please install anaconda-runtime and try again."
            exit 1
        fi
        ;;
  EL6*|FC1?)
        IMPLANT=/usr/bin/implantisomd5
        if [ ! -f $IMPLANT ]; then
            echo "Error: $IMPLANT Not Found!"
            echo "Please install isomd5sum and try again."
            exit 1
        fi
        ;;
  OS_unknown)
        echo "Unknown OS."
        exit 1
        ;;
  *)
        echo "Fix this script for $OS_VER"
        exit 1
esac

if [ $# -lt 2 ]; then
        echo "Usage: `basename $0` source /destination/DVD.iso"
        echo ""
        echo "        The 'source' can be either a directory containing a single"
        echo "        set of isos, or an exploded tree like an ftp site."
        exit 1
fi

DVD_DIR=`dirname $2`
DVD_FILE=`basename $2`

echo "DVD directory is $DVD_DIR"
echo "ISO file is $DVD_FILE"

if [ "$DVD_DIR" = "." ]; then
    echo "Destinaton Directory $DVD_DIR does not exist"
    exit 1
else
    if [ ! -d "/$DVD_DIR" ]; then
        echo "Destinaton Directory $DVD_DIR must be an absolute path"
        exit 1
    else
        if [ "$DVD_FILE" = "" ] || [ -d "$DVD_DIR/$DVD_FILE" ]; then
            echo "Null ISO file name."
            exit 1
        fi
    fi
fi

which mkisofs >&/dev/null
if [ "$?" != 0 ]; then
    echo "mkisofs Not Found"
    echo "yum install mkisofs"
fi

which createrepo >&/dev/null
if [ "$?" != 0 ]; then
    echo "createrepo Not Found"
    echo "yum install createrepo"
fi

if [ -f $2 ]; then
    echo "DVD ISO destination $2 already exists. Remove first to recreate."
    exit 1
fi

# Make sure there is enough free space to hold the DVD image on the filesystem
# where the home directory resides, otherwise change ~/mkrhdvd to point to
# a filesystem with sufficient free space.

cleanup() {
    [ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
    [ -d $LOOP ] && rm -rf $LOOP 
    [ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
    [ -d $DVD ] && rm -rf $DVD 
}

cleanup
mkdir -p $LOOP
mkdir -p $DVD

ls $1/*.iso &>/dev/null
if [ "$?" = 0 ]; then

    echo "Found ISO CD images..."

    CDS=`expr 0`
    DISKS="1"

    [ -w / ] || {   # Very portable, but perhaps not perfect, test for superuser.
        echo "Only 'root' may use this script for loopback mounts" 1>&2
        exit 1
    }

    for f in `ls $1/*.iso`; do
        mount -o loop $f $LOOP
        cp -av $LOOP/* $DVD
        if [ -f $LOOP/.discinfo ]; then
            cp -av $LOOP/.discinfo $DVD
            CDS=`expr $CDS + 1`
            if [ $CDS != 1 ] ; then
                DISKS=`echo ${DISKS},${CDS}`
            fi
        fi
        umount $LOOP
    done
else
    if [ -f $1/isolinux/isolinux.bin ]; then

        echo "Found FTP-like tree..."

        if [ -e $1/.discinfo ]; then
            cp -av $1/.discinfo $DVD
        else
# How does one construct a legal .discinfo file if none is found?
            echo "Error: No .discinfo file found in $1"
            cleanup
            exit 1
        fi
        cp -av $1/* $DVD
    else
        echo "Error: No CD images nor FTP-like tree found in $1"
        cleanup
        exit 1
    fi
fi

if [ -e $DVD/.discinfo ]; then
    awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="ALL" $DVD/.discinfo > $DVD/.discinfo.new
    mv $DVD/.discinfo.new $DVD/.discinfo
else
    echo  "Error: No .discinfo file found in $DVD"
    cleanup
    exit 1
fi

rm -rf $DVD/isolinux/boot.cat
find $DVD -name TRANS.TBL | xargs rm -f

cd $DVD
createrepo -g repodata/comps.xml ./
mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 8 -boot-info-table $DVD
if [ "$?" = 0 ]; then

    echo ""
    echo "Image complete, create md5sum..."

#  $IMPLANT --force $2
# Don't like forced mediacheck? Try this instead.
    $IMPLANT --supported-iso --force $2

    echo "Start cleanup..."

    cleanup

    echo ""
    echo "Process Complete!"
    echo "Wrote DVD ISO image to $DVD_DIR/$DVD_FILE"
    echo ""
else
    echo "ERROR: Image creation failed, start cleanup..."

    cleanup

    echo ""
    echo "Failed to create ISO image $DVD_DIR/$DVD_FILE"
    echo ""
fi

January 28, 2015 · antipaucity · No Comments
Tags: , , , ,  · Posted in: cool, technical, tutorial

columnar “email”

There needs to be a better way of handling group conversations. IRC uses the constant scroll mentality. Email has reply-at-top, reply-at-bottom, and reply-inline.

Forums, reddit, Google+, Facebook, Twitter, and the like have a scroll-like view – every new post is merely sequentially listed after the last.

This can all lead to highly confusing digital conversations.

Somebody should make a parallel (maybe columnar) discussion/chat/email system where every participant can get their own space to reply, they can reply to specific things from different people, and everything can be viewed in an identified manner. Similar to how Track Changes works in Microsoft Word.

Surely it should be That Difficult™ to do this, should it?

January 15, 2015 · antipaucity · 2 Comments
Tags: , , ,  · Posted in: ideas, technical

what should an “ideal” support ticketing system provide?

If you were going to create a support ticketing system from scratch – what would you put in it?

My initial list of needs (some of which derive from my book, Debugging and Supporting Software Systems, and other from my experiences in ticket smashes):

  • “long” title support (HP truncates at 80 characters – give me at least 255)
  • “long” field update support (HP truncates at 4k characters – that’s not enough for some stack traces)
  • clear contact fields for both filer and support case owner
  • allow updates to be made via email or web ui
  • allow attachments (for log files, screenshots, etc)
  • have “private” updates visible only to support personnel
  • clear date/time stamps for updates
  • ability to turn case “result” into a KB article
  • clear resolution field
  • web ui should be highly responsive – and run usably on any modern browser (mobile, desktop, tablet, etc)
  • ability to cross-link to other cases filed by same customer
  • clear indication of who has made updates (maybe alternating colors for customer vs support updates?)
  • as few hoops as possible to open new cases & to update existing ones
  • simple way to close a case if you’re the opener
  • easy means to transfer ownership of a case – both for the customer and for the support technician
  • ability to search previous cases – both for customers and engineers

What else would you add? What would you change?

January 9, 2015 · antipaucity · 3 Comments
Tags: ,  · Posted in: technical

fix ibm – hire me as your ceo

Robert Cringely has written myriad times on IBM. His most recent post was titled, “How to fix IBM”.

His solution is simple and easy: “Go back to customers being a corporate priority.”

But IBM, as it stands today, will never get there.

And all the “leadership” they’ve brought in over the years has only compounded their errors faster – they’ve never done anything to even try to fix them. Why? Because they keep bringing-in stodgy old-thinking people who have no concept about what customer service means.

Ginni Rometty, and the rest of the senior leadership at IBM, needs to go. Absolutely. But when IBM brings-in new leadership, it truly needs to be, well, “new”. You need the same kind of leadership sea change Jack Ryan championed in Tom Clancy’s Executive Orders – you don’t need career managers and “senior” leadership: you need people with ideas who are will to try something new. Who are willing to fail, but to fail fast. Who will learn from failure, and keep iterating until there’s something that works.

So, IBM, I have a simple solution for you: hire me as your CEO. Give me 36 months to fix your problems. If I haven’t, let me go back to whence I came. But when I have, Wall Street will love you, and you’ll be on track to stay relevant for the next hundred years. Or, at least the next 30 (since I’ll want to retire some day). I’ve got a team of people already in mind who can do more for you in 18 months than the entire executive team has done in the last 180.

January 8, 2015 · antipaucity · 4 Comments
Tags: ,  · Posted in: commentary, ideas

assume formlessness – law 48 – #48laws by robert greene

Law 48

By taking a shape, by having a visible plan, you open yourself to attack. Instead of taking a form for your enemy to grasp, keep yourself adaptable and on the move. Accept the fact that nothing is certain and no law is fixed. The best way to protect yourself is to be as fluid and formless as water; never bet on stability or lasting order. Everything changes. –Robert Greene, The 48 Laws of Power (review)


Sun Tzu says the same thing in Chapter 6 of The Art of War:

Provoke him, to know his patterns of movement. Determine his position, to know the ground of death and of life. Probe him, to know where he is strong and where he is weak. The ultimate skill is to take up a position where you are formless.

If you are formless, the most penetrating spies will not be able to discern you, or the wisest counsels will not be able to do calculations against you. With formation, the army achieves victories yet they do not understand how. Everyone knows the formation by which you achieved victory, yet no one knows the formations by which you were able to create victory. Therefore, your strategy for victories in battle is not repetitious, and your formations in response to the enemy are endless.

The army’s formation is like water. The water’s formation avoids the high and rushes to the low. So an army’s formation avoids the strong and rushes to the weak. Water’s formation adapts to the ground when flowing. So then an army’s formation adapts to the enemy to achieve victory. Therefore, an army does not have constant force, or have constant formation.

Those who are able to adapt and change in accord with the enemy and achieve victory are called divine.

November 27, 2014 · antipaucity · No Comments
Tags:  · Posted in: books, commentary

charge for carry-on luggage

Airlines over the past several years have begun charging for all kinds of things that used to be “free” (they weren’t ever “free”, they just hid the cost in your ticket price).

One of the worst offenders to this list of fees, though, is the inane charge for your first checked bag whereas carry-on baggage is free. Southwest doesn’t charge for your first two checked bags – and other airlines won’t if you have status or book your flight with their branded credit card – which is the model all airlines should use. But they need to add charging for anything for than your FAA-recognized “personal item”.

Why? Because finding overhead bin space for bulky carry-on bags is what slows most boardings to a crawl. And it is what makes most travelers most frustrated when getting on the plane – not in the first or second boarding groups? They’re going to check your bag(s) for you anyway because all the bin space is taken. (Add-in the ridiculous seat pitch, and you can hardly put anything but a small backpack or purse down by your feet anyway.)

My solution: give the first (and maybe second) checked bags away for free. But charge heavily for carry-on baggage that is more than a personal item (ie your laptop case or purse). (I’d allow an exception for items purchased in-airport from the duty-free shops – they can be carried-on free, too.) By “heavily”, I mean at least $50.

And I would eliminate that crazy practice of gate-checking your bag when getting onto a commuter flight: just check the bag and don’t bottleneck the jetway getting on and off for the rest of us who weren’t as narcissistic as to think bringing our roll-aboards onboard was a good idea.

With the TSA  suggesting everyone arrive at least 2 hours before their flight, there is no reason you wouldn’t have time to check your bags. And with the hassle of trying to navigate a crowded terminal dragging your wheelie duffel behind you, everyone should love the idea of just getting it at baggage claim.

“But what about lost bags?” I hear you ask. Lost and misdirected baggage happens. But it’s pretty rare. It’s something that has happened to me the sum total of 3 times in my flying life (the last 18 years, several of which included flying frequently for work). And of those 3 instances, only 1 ended up with the bag going to the wrong airport – each of the other two ended up with the bag arriving before I did.

Frontier Airlines gets it right (almost – on the carry-on aspect they do, but they still charge for checked bags). Mash Southwest’s checked policy with Frontier’s charging for carry-ons, and you would have a worlds-better flight experience.

The other major benefit to this plan: your time going through TSA will be shorter – the fewer bags that have to be scanned, the less time it will take to get through.

November 20, 2014 · antipaucity · One Comment
Tags: , ,  · Posted in: complaint, insights, travel

do not go past the mark you aimed for; in victory, learn when to stop – law 47 – #48laws by robert greene

Law 47

The moment of victory is often the moment of greatest peril. In the heat of victory, arrogance and overconfidence can push you past the goal you had aimed for, and by going too far, you make more enemies than you defeat. Do not allow success to go to your head. There is no substitute for strategy and careful planning. Set a goal, and when you reach it, stop. –Robert Greene, The 48 Laws of Power (review)


Shipping is a Feature.

November 13, 2014 · antipaucity · No Comments
Tags:  · Posted in: books, commentary