Articles by Scott Hebert

  1. Here Comes Git

    Posted on in uncategorized

    In January of 2016, I joined Facebook and had to make the switch from git to hg. To be honest, I wasn't really some sort of zen master of git, but it didn't take me long to completely forget everything I knew about it.

    Now that I've moved on to …

  2. Welcome... Again

    Posted on in uncategorized

    I've been out of pocket for a while and really have neglected this site. So, as goofy as these things sound, I'm making it a personal goal to contribute more regularly to slaptijack.com in 2022.

    I somehow managed to lose my old copy of the markdown I used to …

  3. Pro Tip: Keep Asterisk Configuration Files in Version Control

    Posted on in voice

    An Asterisk server has a very involved configuration system. One instance I manage has over 100 configuration files. As these configurations grow, it can be helpful to have a separate server running for testing and debugging problems. If you are planning a major change, it's often helpful to get it …

  4. TACACS Detected 'Invalid Argument'

    Posted on in Networking

    As always, I've changed pertinent details for reasons.

    I was working on an ASR the other day and received the follow error:

    RP/0/RSP0/CPU0:ASR9K(config-tacacs-host)# commit
    Fri Jul 29 12:55:46.243 PDT
    
    % Failed to commit one or more configuration items during a pseudo-atomic
    operation. All …
  5. Two Column for Loop in bash

    Posted on in programming

    I had this interesting question the other day. Someone had a file with two columns of data in it. They wanted to assign each column to a different variable and then take action using those two variables. Here's the example I wrote for them:

    IFS=$'\n';
    for LINE in $(cat …
  6. OpenSSH: Using a Bastion Host

    Posted on in System Administration

    Quick and dirty OpenSSH configlet here. If you have a set of hosts or devices that require you to first jump through a bastion host, the following will allow you to run a single ssh command:

    Host *
        ProxyCommand ssh -A <bastion_host> nc %h %p
    

    Change the Host * line to best …

  7. [Python] Socket Timeouts in urllib2

    Posted on in Programming

    Things have changed quite a lot since this post was originally written in 2016. Currently, I would recommend switching over to making asynchronous calls via aiohttp.

    One of my scripts that makes an API call has been failing silently lately. It appears that the connection is timing out, but I …

  8. Cache has broken packages, exiting

    Posted on in system_administration

    I've been getting the following error from cron.daily in my inbox lately:

    /etc/cron.daily/apt:
    Cache has broken packages, exiting
    

    That's an annoying email to get everyday. I decided I would apt-get clean and that would probably fix the problem:

    $ sudo apt-get clean
    $ sudo apt-get dist-upgrade
    Reading package …
  9. Removing a Single Line from known_hosts With sed

    Posted on in System Administration

    Ever so often, something changes on the network, and you find that your .ssh/known_hosts file has gotten out of date. Usually this happens after an upgrade or device change. You'll get the rather ominous warning that REMOTE HOST IDENTIFICATION HAS CHANGED!

    If you are confident that someone isn't doing …

  10. Bypass RBL Check in Exim

    Posted on in System Administration

    Although I do not use Exim myself, I have clients that do. Recently, we noticed that it was taking more than 20 seconds for their SMTP banner to display when initiating checks from the monitoring server. Connecting to the server locally (on any interface IP address) did not suffer the …

  11. Enable gzip in Nginx

    Posted on in System Administration

    If you have ever used any tool to optimize a web page, you know that compressing the return traffic to the client is a big win. In nginx, this is done with the gzip module. The easiest thing to do is add gzip on; to the http stanza in your …

Slaptijack's Koding Kraken