Category Archives: minipost

Another old copy

This post is by request (after I mentioned the trick in passing to someone on IRC).

So, the lay of the land: you find yourself in some dubious or highly unconventional position of server access. Maybe it’s behind a few layers of ssh jumps and VPN paths. Maybe the only way to get data input is that it’s on the other side of a phonecall, a human slowly typing in some things as you read it out to them. Maybe it’s just some damned SSO config on a corporate network somewhere. Doesn’t matter exactly which it is, you have the problem that you cannot easily copy a set of files to where you need it.

There’s a few handfuls of ways in which one can deal with this. One of the easiest, if you can manage, is to stick it somewhere as an HTTPS resource and pull that down. But… sometimes you don’t have HTTPS access (or, for that matter, any outbound internet access at all). Maybe you can do some DNS tunneling? The difficulty of that ramps up rather quickly, unfortunately. You just happen to not have your DNS fileserver running today!

But… hey, you already have a shell, right? And there’s a `base64` or `od` binary on that host, or maybe some python or Perl or even bash?

Well then, lucky you.

Take your file on the input side. Pop it through a base64 encode.

# presuming OSX
source% base64 -i some_input -o the_base64

Read that base64 into your pastebuffer, paste on the other side. End off your heredoc (they do make it easier in many cases). Remake your file as you need it.

# presuming linux
dest% cat <<EOF>> base64_input
< the paste goes here >
dest% base64 -d base64_input > the_original

You need multiple files? Roundtrip it through an archive!

Maybe they’re big files and you’re worried about items getting lost? `split` and `par2` are your friends! Don’t have `par2`? No matter, you can install it in this manner!

You can see how versatile this technique can be. And how insane. But it’s a nice enough wrench to have in your toolbox if you ever need to hit a nail in, if you know what I mean.

It’s also by no means new. Nor is it previously undocumented. Or even the only variation of this trick[0]. It’s just one of those things that sometimes happens to need to be shown. Lest the arcana be forgotten.

[0] – for a fun exercise, see how many variations of this you can come up with.

Drone CI Slack plugin changes for 0.4 to 0.5

Recently I’ve setup Drone CI for internal use, and ran into an issue with the Slack plugin failing to work. I thought I’d give a quick summary here of what was necessary to fix it on my setup, as the documentation (as it stands today) didn’t make it very clear.

The config required for making the Slack plugin work on 0.4 looks like this:

    channel: general
    username: drone

And the config for 0.5 like this:


    image: plugins/slack
    channel: general
    username: drone

The main differences I observed are:

  • the depth at which the notification plugin is stated (on 0.4 it’s at the root, on 0.5 it’s under pipeline)
  • “webhook_url” changed to “webhook”
  • the notify keyword/section appears to no longer be required

Mailmate Submailbox SNR hack

Problem statement: One of my customers uses Bitbucket for their code, and I have a noisy mailbox.

Instead of writing even more filters¹, I opted to use the Mailmate Smart Mailbox feature to get a better signal about/for things from Bitbucket

Here’s a regex I used:

${subject.body/Pull request #([0-9]+): (.*) \(.*\/(.*)\).*/${3} - #${1} ${2}/}

It works pretty well.

And credit where credit is due: I first saw pbrooko do this, so the idea inspiration is there.

¹) I find filters to be cause for problems in experience across all my devices and interfaces

My sound setup

Since I find myself linking to this frequently enough (and because it’s been a while since this had a post), I figured I’d just write it up somewhere.

Portable set

1x Hardshell case
1x Sennheiser HD558
1x FiiO E10K
1x Shorter cable

The carry case isn’t amazing, but it gets the job done, and I got it delivered in something like a day during one of my recent US trips.

More stationary/”used in study” set

1x FiiO E10K
1x Sennheiser HD598

What I’d change

At some point I might get a Maverick DAC (or one of the other ones you can find these days), and maybe a set of HD650 cans.

What I like

My phone has enough juice on its output to be able to drive the HD558 set reasonably, but does have a noticably lower maximum compared to the DAC. If I were to try go past that, I’ve eyed the E6 and E12 as possible options. No major reason for the FiiO units above anything else, they’ve just not let me down yet and they’re cheap enough to be reasonable (which factors in on shipping things to .za)

What sucks

Both the headphone models above are open-back, which have issues being used in more crowded places or alongside busy roads or on the train, etc. I used to use a set of Sennheiser CX200 instead during those times, but mine got lost somewhere before the move. One friend has recommended the NVX XPT100 as an option, and another the Allesandro MS-1s (which are basically a re-release of the Grados or somesuch). I prefer over-ear over on-ear, so I expect I’d probably try something like the XPT100 set first.

Keys, identity, etc

This post serves as a general notice of key update, as well as a short bit of history.

My new GPG key is a 4096 RSA. It’s available on the SKS keyservers already, and has the fingerprint 1A9260611F0D15319BE6465E474E16D0F70C7CC9. I have also updated my Keybase identity with this as appropriate, as well as updating my online pubkey store.

My old key was E5BB45ADAC20F87D8E5C2316D3C406A99ABE41AE, 1024 DSA. I’ll be pushing a revocation for this in about a week’s time.

The intention behind this is a general update, plus also just adding some clarity to my public key situation. I have some Older Keys which happened, in various states, from times when I had no clue to times where I had no ability to survive machine or disk failures. Aside from those conditions, I had another key which I also no longer wish to use (due to reasonable key size concerns etc).

Also, updates

mysql> delete from wp_comments where comment_approved=0;
 Query OK, 16330 rows affected, 40 warnings (0.59 sec)

*updates wordpress, disables comments, leaves Disqus to do the rest*

News and such

Been a while. I wrote some small bad software. The cornercase for which I needed it was “mutually-viewed screen session running pushloop, which does puppet runs” for some work a colleague and I were doing. Post-receive config to echo to a file (from your DVCS of choice), done/done.

I’ll also be doing a talk on Logcabin at PyconZA this coming week (with opensourcing the module coming in the near future). It’s been fun doing things with that.

Outside of the tech space I guess I’m just waiting for things to tick up.

USB port orientation usability idea

I’m not a designer by trade, so this is purely a quick image mockup. But imagine how much quantum turning could’ve been spared if this was in the standard from the getgo:

So what I’m thinking is that on the machine it could get indicated which side is which. And yeah, I finally got to post this thing, after meaning to do so (and continually forgetting) for a couple of months now.

Update: source for image original is Wikipedia

Something I really need to add to my system-prov script

root@likho:~# echo “blacklist pcspkr” > /etc/modprobe.d/diaf.conf

“Quality of service”

Alternative title: what happens when you buy things that are licensed/run per TCP connection it can maintain.

hageshii% date; elegua; date
Fri Feb 15 22:08:41 SAST 2013
Linux elegua 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
Last login: Fri Feb 15 20:44:49 2013 from
elegua% Write failed: Broken pipe
Shared connection to closed.
Fri Feb 15 22:18:47 SAST 2013

10 minutes almost to the dot and my connection is forcefully severed, presumably for inactivity. I wonder how many inadvertent breakages this can cause. It’s certainly annoying. Thanks, Vodacom.

(Yes, I know I can VPN around this, or use mosh, or or or. Unfortunately none of those were quick to do because I hadn’t booted this box in quite a while, and Expensive-with-expiring-bytes-G connection is better used on other things than this)

And this is what the trace looks like:

 Host                                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1.                                      0.0%   131    1.5   9.4   1.1 211.2  27.6
 2.                                        0.0%   131   54.6 327.0  38.5 5456. 844.4
 3.                                      0.8%   131   47.9 314.3  42.1 5400. 823.9
 4.                                      5.4%   131   48.8 309.2  42.4 5346. 832.0
 5.                                    12.3%   131   55.7 247.6  39.4 5290. 790.0
 6.                7.7%   131   52.8 294.0  39.4 5234. 815.3
 7.                                         10.0%   131   49.7 249.9  36.6 5178. 764.8
 8.                                      7.8%   130  423.0 474.4 210.7 5155. 851.3
 9.                   34.1%   130  483.0 461.4 204.0 4123. 762.5
10.                 24.0%   130  239.5 502.6 216.1 5009. 882.5
11.                24.0%   130  231.0 409.9 216.0 4010. 614.4
12.              22.5%   130  237.8 473.7 216.9 5906. 897.6
13.              22.5%   130  250.2 445.7 219.9 5851. 793.7
14. ???
15.                                   32.6%   130  247.4 406.6 223.9 4726. 723.5
16.                  74.4%   130  233.1 740.9 225.0 5682. 1218.
17.                     18.6%   130  339.2 491.0 221.3 5626. 841.9
18.                                     1.6%   130  343.7 508.1 226.2 5571. 829.2

Hi-kwality packets.