Mostly Unixish Standalone, single-file, editable Python scripts WITH DEPENDENCIES How badly I wanted something like that? The problem: Python for scripting Beside programming and data science, I find Python to be a very useful glue language; I think it's great for shell
Mostly Unixish Misaligned Expectations: investigating the expectations gap As some of my followers already know, I'm enrolled in the great Master's program at Georgia Tech, the OMSCS. As a part of my studies, I'm doing some research to investigate the expectations
Mostly Unixish SCP taming: stop local silliness Every day now and then, I get an scp command wrong. Scp is designed after commands like rcp and works totally fine for local-to-local file copy. While this can (or could) be useful
Ollivander Command line data crunching with Python Every time I'm doing some data crunching on the command line, I find myself juggling between sed, awk, sort, uniq, etc. While I like the UNIX way of having one tool doing one
Mostly Unixish Git: automatically set and use multiple commit identities Sure, git is great. Sure it is possible to use multiple commit identities in git - just set local per-repo variables. If it weren't for the fact that chances of forgetting about it
Mostly Unixish badblocks: test your mass storage! Are you unsure whether your mass storage works properly? Do you suspect it's faulty somewhere? Verify it with a nifty tool, included in most Linux distros and in macOS if you install the
Mostly Unixish Automated cleanup of Docker leavings As much as I like Docker, one thing it doesn't do well: cleanup whatever is left on my hard drive after running it for a while. There're generally two kinds of Docker Waste:
Mostly Unixish Python requests SSL and InsecurePlatformWarning Every now and then, when using Python 2.7 < 2.7.9 and trying to access SSL resources, especially through the requests toolkit, which seems to trigger the issue frequently - but
Mostly Unixish chmod and the capital X This is one very, very, very interesting piece of ancient wisdom. Suppose you need to change permissions for some directories. Maybe the permissions are too strict, e.g. something like 700 for directories
Mostly Unixish Kill Me Softly: killing a process The Right Way I was tired of repeating the same old pattern. Send a kill signal. Check with pgrep. Did the process exit? Send a kill -9. Now all my knowledge has been permanently dumped here:
Mostly Unixish Unfreezing your desktop: when Compiz goes wrong A desktop freeze is something that's not so rare nowadays - that's not good, but we shouldn't get desperate about that. I like Compiz with Unity Desktop on my Ubuntu Trusty very much;
Mostly Unixish Don't give a shell to system users - use su I seem very ancientwisdom-oriented these days. Sometimes you've got a system user on your linux server that's used to run a specific service; it's a good practice to employ those users to achieve
Mostly Unixish SSH hostnames configuration and shortcuts This is another old trick, but I like to tell the world about such amenities. I often find people writing command lines such as: ssh arcane-system-user@someextremelylong.andimpossibiletotype.anderrorprone.hostname.com or, worse
Mostly Unixish I wish sudo would ask for my password less often This is a very old trick, but I find many people doesn't know about it yet. If you're using sudo (and you definitely should), one minor complaint is that you need to re-enter
Mostly Unixish Ubuntu: faster release upgrade It might be high time to update to the latest Ubuntu 14.04. I think that the upgrade process that is provided by Canonical is slightly underoptimal: if you're using a local mirror
Mostly Unixish Keep your tomcat instance up-to-date, and keep apps and configuration tidy. UPDATED: 26th January 2015, with Tomcat 8 support. Today I'm gonna share something that I figured out some times ago: how do I keep my tomcat installation up to date on my servers?
Mostly Unixish Puppet Http Source for files Sometimes you would like to use an http URL as the source file for puppet; while it's being discussed since long, no implementation has been created so far. Of course it would be
Mostly Unixish Quick log for bash scripts, with line limit Sometimes you need to write a quick shell script; many a time, you need to put it on a server, and launch it every now and then, or run it in a cron
Mostly Unixish apt-get update: fixing 'package index files are corrupted' Sometimes when performing your daily apt-get update, you'll experience messages like E: The package lists or status file could not be parsed or opened. or The package index files are corrupted Such messages
Mostly Unixish Wmctrl: gather and focus your chosen window by hotkey I find it extremely handy to be able to recall my windows by just using the keyboard. It's pretty easy to do in Linux, just use: wmctrl -x -R <WM_CLASS>
Mostly Unixish ssh-copy-id with nonstandard sshd port UPDATE: modern ssh-copy-id often support a -p parameter for the port. So this trick is unnecessary and won't probably work. ssh-copy-id is a cool script which is usually distributed along openssh client nowadays;
Mostly Unixish ssh client: stopping key verification complaints inside your own private network If you develop enough software, most probably you'll have a test/development network at your service. In such networks, which are usually handled through a virtualization infrastructure, machines come and go very quickly.
Mostly Unixish Thunderbird temporary directory Whenever you use Thunderbird on Linux you may encounter one annoying behaviour. If you open a message which is got an attachment - you just need to open the message, not to save
Mostly Unixish Disown is your friend Bash builtin disown is a not-so-well known [job control command] http://www.gnu.org/software/bash/manual/html_node/Job-Control-Builtins.html), and yet it's an extremely useful one. So what? You've started a
Mostly Unixish Purging outdated kernels on systems with unattended-upgrades Whenever I install a production system/server I tend to enable full automatic updating, because it's usually better that something breaks because of a failed update rather than leaving a production machine unpatched;