Alan's amusing and surprising homepage
  • Home
  • About me
  • Ollivander
  • Mostly Unixish
  • Projects
  • Speaking
  • Legalese
  • Cookies
  • Donate

Mostly Unixish

Mostly Unixish is where I collect some good tips and tricks for Linux, MacOS X and (sometimes) other *nixes.

Standalone, single-file, editable Python scripts WITH DEPENDENCIES
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

  • Alan Franzoni
    Alan Franzoni
3 min read
Misaligned Expectations: investigating the expectations gap
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
Command line data crunching with Python
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

  • Alan Franzoni
    Alan Franzoni
2 min read
Git: automatically set and use multiple commit identities
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
Automated cleanup of Docker leavings
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:

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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:

  • Alan Franzoni
    Alan Franzoni
1 min read
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;

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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?

  • Alan Franzoni
    Alan Franzoni
5 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
2 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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>

  • Alan Franzoni
    Alan Franzoni
1 min read
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;

  • Alan Franzoni
    Alan Franzoni
1 min read
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.

  • Alan Franzoni
    Alan Franzoni
2 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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

  • Alan Franzoni
    Alan Franzoni
1 min read
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;

  • Alan Franzoni
    Alan Franzoni
2 min read
Alan's amusing and surprising homepage © 2019
Latest Posts Twitter Ghost