-
Quick tip: Making files immutable on GNU/Linux
The other day, I was having some problems with Network Manager (I only ever have problems with it to be honest). It kept overwriting my /etc/resolv.conf — the file where you configure what nameservers your system will use. Even after I uninstalled Network Manger, on rebooot I would find my …
- On:
-
Using mailp.in from Bash
I recently learned of a new web publishing tool called mailp.in, which lets you publish stories to a custom url by sending email to a particular email address. Quite a nifty idea.The service is a model of minimalist, yet highly functional design. The simplest thing that could possibly work, you …
- On:
-
Quick tip: Find all image sizes ImageMagick and find
A super quick tip this. The other day I needded to find images bigger than a given width on the New Internationalist website. The quickest way I could think of to do this was to use find to locate all the files and combine that with ImageMagick’s identify command. And finally to pipe that t …
- On:
-
Lunchtime hack: Google spellchecker on the commandline onliner
I was just talking to my colleague Pete about how useful Google’s Did you mean? feature is as a spell checker. It comes up with much better suggestions than other systems. So here is a quick lunchtime hack that uses the little-known Lynx browser -dump command and some Perl to make a comma …
- On:
-
Navigating your bash history. A quick reference.
One of the ways to make yourelf more productive and to save unnecessary typing in the bash shell is to get familiar with navigating your history. There are a number of ways to navigate your bash history beyond simply using the up arrow to get at your last command. This is a quick reference to some o …
- On:
-
bashtweet.sh - tweet from a terminal with cURL
This is a neat trick. A friend was looking for a convenient way to tweet (or send to statusnet) from Bash, this is a fairly straightforward way to do that.
There are a couple of bits you need before we play with the script. You’ll need cURL installed, many Unices do this by de …
- On:
-
Motherboard details from the GNU/Linux commandline
A quick bit of commandline-fu today. And a trick that I always spend ages having to search the web for. Its often the case that you want to find the exact serial number or model or chipset of your motherboard. There is a wonderful command called dmidecode which fetches the DMI data from your mach …
- On:
-
Copying videos off Vimeo with bash
A lot of video people are hosting on Vimeo these days, it seems well featured reliable and fast, and it doen’t have quite the same psychotically disordered commenting culture as has developed at youtube. However, though there is good stuff to watch on there, not every video uploaded has …
- On:
-
Tip: Blocking spam with iptables on GNU/Linux
Spam is a constant problem for me as a sys admin. Even after greylisting and denyhosts and fail2banning I still find myself wanting to deny access to the occasional ip address. The netfilter.org project iptables provides a pretty nice firewall for the Linux kernel. I often forget the syntax an …
- On:
-
Bash Tip: Remove a line from middle of file
This is a thing that I’ve wanted to do for ages, and it came up for me during this week'd episode of Hak5, which I am getting to be a big fan of by the way. The material under discussion was what to do when one of your known hosts changes. Darren was saying he was a bit slack and just did a …
- On:
-
Tip: is.gd from the commandline
This is a pretty minimal tip. The other day I was looking for a way to shorten URLs from the commandline. Now the bit.ly API expects you to authenticate before doing any shortening (I’ve not pulled apart the web ui to see if its possible without). The is.gd URL shortener has no such restric …
- On: