Tag: Shell Script
-
Set Vim background based on your terminal’s background color
I’ve been spending more time at the pool lately (sorry, not sorry) and I’ve found myself manually switching between a light and a dark gnome-terminal theme. This was all well and good, but my .vimrc includes set background=dark so regardless of which theme I’m using in the terminal, vim has…
-
How to tell if your shell is a subshell of Vim
If you’re like me, you use Vim. If you’re like me, you use :sh[ell]. If you’re like me, you forget that you used :sh and open Vim again. I’ve been getting better about it, but every once in a while I end up with 2 or 3 nested Vim processes…
-
Intentional infinite loops
It’s happened to all of us. A script just locks up and we’re unsure why. At closer inspection we find that we’re written a loop that has no terminating condition. It is an endless loop and in many cases consumes memory until it crashes. But what if you want to…
-
Forcing yourself to use shell aliases
Fact: Shell aliases save you time. Fact: Saving time increases your productivity. Fact: Everybody wants to be more productive. Fact: Retraining muscle memory can be a pain in the ass. I have been fighting that last fact for a while now. I have the single character alias v pointed to…
-
Command line all the things!
The start of 2014 has been an exercise in going back to basics for me. I’ve been re-evaluating my workflows when hacking and attempting to streamline as much as humanly possible. This has resulted in a ton of new aliases in an attempt to get my common CLI commands down…
-
Temporary ufw rules or How I learned to stop scripting and love the shell
This post was originally planned to be a social commentary on the potential for riots this coming Novemeber (a/k/a The 2013 Food Stamp Riots a/k/a The Backlash of the Entitlement Society) but that seemed like such a fucking downer. Then the post was supposed to be about a Python script…
-
Simplifying Single Server Deployments
Last week I discussed the importance of version control for individuals but something I didn’t touch on was how version control systems can be used to simplify and/or automate deployments. I’ve been through the different setups out there, using plain old rsync, leveraging GitHub’s Post-Receive WebHook to call a URL…
-
Spell & Speak
One thing that I really enjoy about OSX (possibly the only thing) is the text to speech capabilities. The command line application say sounds good and doesn’t seem nearly as buggy as some of the open source counterparts. Now what I’ve been doing recently to help get my daughter acclimated…
-
Recursive PHP Lint-inator
Just cleaning up a repository at work and came across a script I haven’t used in forever, a script to lint all PHP files in a directory, recursively. Expect something more stimulating soon as I found out the hard way that tumblr doesn’t seem to auto-save your posts once you’ve…
-
Script to Install Adobe Air on Ubuntu 64-bit
So after giving Gwibber an honest try for a few months, I’ve decided it’s time to move back to DestroyTwitter for my tweeting needs. Unfortunately, earlier in the year when I completely denounced Adobe products (specifically Flash) I went ahead and completely removed Air from my system. But alas, I…