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”
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”
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”
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”
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”
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/
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”
SysadminJr: Ha, but seriously – been having issues with Grafana lately.
SysadminSr: Just bypass that and do some real-time monitoring at the sources.
SysadminJr: Open 20 different SSH tabs?
SysadminSr: tmux, son, tmux. Check out tmuxcheatsheet.com.
Expect is used to tie together multiple scripts or statements for which shell scripting is not quite powerful enough. From the man page: “In general, Expect is useful for running any program which requires interaction between the program and the user. All that is necessary is that the interaction can be characterized programmatically. Expect can also give the user back control (without halting the program being controlled) if desired. Similarly, the user can return control to the script at any time.”