A surprising missing Unix command: waiting until a time is reached
A surprising missing Unix command: 'sleep until it is time
orlater'. Even GNU sleep only sleeps for a duration. The obvious option here is
at, butathas a number of drawbacksthat make it far from an ideal experience. For now, I'll just notethat it of course runs your commands non-interactively, and sometimesyou need interactivity. Perhaps you're doing:waituntil 17:50; rsync -a login@host:/
How you tell what signals a Linux process is ignoring
Suppose that you want to know what processes on your system areignoring certain signals, such as the
SIGTERMthat systemd usesto try to get lingering processes to quit .How do you find this out? As with many process-related things in Linux,the answer is that you look in/proc.Specifically, you look in
/proc//status and get the SigIgn:field. This is in hex, and may look something like this:SigIgn: 0000000
Some options for reindenting (some of) my existing Python code
In my entry on how I'm probably going to change my style ofindenting Python code , I said that itwas at least a bit tempting to reformat existing code to be PEP-8compatible (probably using the 'if I have to touch it at all, itgets reindented' approach). This leaves me with the question of howto do that.
In an ideal world I could simply load code into GNU Emacs and say'okay, my indent level is going from 8 spaces to 4 spaces
My ambivalent view on Vim superintelligence, contrasted with GNU Emacs
I have historically had an extremely ambivalent attitude on vim asa superintelligent editor; my standard remark is that if I wantsuch an editor, that's what I have GNU Emacs for. Part of this isjust that I often want vim to not get in the way ,and part of this is that I'm used to vi being vi. But a good part ofthis comes down to what I see as a fundamental philosophical differencebetween the editors.
To put it simply, vi has a powerful conceptual
Code alone can tell you the what but it cannot tell you why
It all started when John Arundel tweeted :
@hlship :I completely don't buy into "code is self documenting". Code needsdocs to explain the why; code by itself is only how.
I think code should be so clear, simple, and straightforward as toneed the fewest possible comments, ideally zero.
and then, in a followup tweet :
I'm not saying you shouldn't comment your code. I'm saying you shouldcode so that you don't need to.
What I did to set up a wireless network and what I have left to do
I didn't entirely plan on setting up a home wireless network tonight,but sometimes these things happen.
Up until now, what I have had at home is my home Linux machine and a DSL modem. I run PPPoE on my home machine and it sits directly on the Internet.This is an unusual setup, but it's all that I needed and I don'treally like being behind NAT gateways and so on. In the beginningmy DSL modem was just a DSL modem,
I think I'm going to shift my style of Python indentation
Ever since I started programming what is now a very long time ago,I've indented almost every language I've worked in in the samesimple way; each indentation level is 8 spaces wide and I use realtab characters. I'm not sure where this came from but it's clearlythe lazy way to use non-autoindenting editors to write code, sinceall you do to indent each line is hit your tab key a few times.Need to dedent a line? Delete a leading tab
Systemd has a problem with SATA disks behind port multipliers
The servers for our disk based backup system are all running Ubuntu 12.04,because that's what was current when we last had to touch them.Ubuntu 12.04 is on its way out, so we're starting to rebuild allof our 12.04 machines on 16.04, and today we did this to the firstbackup server. Fortunately it was a server used for our long-termbackups server and thussomething we don't need
A look into a future where things assume you have a smartphone
My local bike club has increasingly been goingpaperless for bike ride routes . I'vebeen a paper holdout, but recently I pushed myself into decidingto finally get a bike GPS unit for ride navigation. Naturally thisled to a frenzy of Internet research on the whole area, the summaryof which is that there are only two serious competitors in thisarea right now (which is much less than I was expecting).
At this point, Garmin has probably been making the Garmin Edgeseries of GPS bike computers for
I need more than one way to get on the Internet from home
I'm in an unusual situation in today's modern world: I have only asingle way to get on the Internet from home (and from only asingle machine ). My DSL connection is so reliableand so comfortable ( especially lately )that I usually don't even think about it; it's just there, quietlyworking away. Until the rare occasion when it isn't, and I getsmacked with just how crippling a problem this is. It's not justthat I
Menu