Category: System Administration

The UNIX-HATERS Handbook (1994):

I love it haha…check it out here.

 

Chapter 1: Unix - The World's First Computer Virus
Chapter 1: Unix – The World’s First Computer Virus

 

Paranoid Android, or How I Built a Twitter Bot and Lost a Little Bit of Faith In Humanity

The setup

I lied – this post isn’t going to be about how I built the Twitter bot. There are dozens of half-way decent tutorials scattered across the web and even a couple of decent ones and you’re welcome to exercise your DuckDuckGo-Fu or Google-Fu and figure it out.

Instead, this will be about my experience wading into the collective dumpster fire/garbage pit that is Twitter with some simple automation.

Continue reading “Paranoid Android, or How I Built a Twitter Bot and Lost a Little Bit of Faith In Humanity”

Roundcube 1.3.8-compatible plugin to allow a user to self-reset a forgotten password

Been working on lots of little personal projects lately, but find myself running into that old problem of, too much shit to do with not enough time to do it. That’s another way to say, color me lazy, but let’s not reinvent the wheel with everything I do.

Born of this labor…

Continue reading “Roundcube 1.3.8-compatible plugin to allow a user to self-reset a forgotten password”

Twitter sentiment analyzer using Tweepy, TextBlob, MariaDB, SQLAlchemy and dataset

I found a fairly decent online tutorial for creating a Twitter sentiment analyzer. Though helpful, I didn’t find that it was particularly intuitive, put together fairly well or workable in Python 3.

So, I took the concepts and substantial amount of the code and started fixing, modifying and rewriting…

Continue reading “Twitter sentiment analyzer using Tweepy, TextBlob, MariaDB, SQLAlchemy and dataset”

“Ironies of Automation” by Lisanne Bainbridge

Published in 1983 but still timely: ~5K words – 18-20 minutes

watch multiple Linux commands

Occasionally I’ll have the need to watch screen output of multiple commands on the Linux CLI. Supremely easy but I don’t do it often enough to remember that I need to wrap the sequence in single (‘) or double (“) quotes. Correct formatting is below:

Continue reading “watch multiple Linux commands”

Force delete/restart Kubernetes pods

Occasionally, I have a need to delete and restart k8s pods after I’ve been hammering on a cluster, when I need to perform node maintenance, or when a project has run its course and I want to free up the namespace and/or resources. Below is a general overview of that procedure but note that it is specific to certain scenarios only and assumes you know the consequences of your actions. I do not warranty any of this!

Continue reading “Force delete/restart Kubernetes pods”

Open up Docker ports in UFW

My home Docker installation had some ports blocked internally for a project I was working on today. The sequence of commands listed below will allow the containers to communicate internally while still keeping open outgoing connection and not changing any incoming UFW rules.

sudo ufw allow in on docker0
sudo sed -i s/DEFAULT_FORWARD_POLICY=\"DROP\"/DEFAULT_FORWARD_POLICY=\"ACCEPT\"/ /etc/default/ufw
sudo ufw enable
sudo iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE

Original source link: http://blog.lukebennett.com/2015/09/13/make-docker-play-nicely-with-ufw/

Increase swap size for your Raspberry Pi

I have a little low-end POC (proof of concept) I’m testing out at home before I bring it in to work. The POC requires my Raspberry Pi to run a couple of Docker containers which isn’t really a problem. However, I’m using a 1st-gen Pi that came out with only 512MB RAM total. By the time Docker itself was up and running, I had something on the order of 40-50MB of RAM left and another 99MB swap with the stock swap settings. Continue reading “Increase swap size for your Raspberry Pi”

%d bloggers like this: