Posts Tagged ‘geek’
Thursday, October 9th, 2008 |
Tags: geek, os x, terminal, unix
Posted in bash | No Comments »
I have added aliases and other customisations to my bash shell over the last four years to reach a point I’m quite happy with.
Ultimately, I think everyone’s shell will be different as well perform different tasks and have different priorities. (more…)
Thursday, October 9th, 2008 |
Tags: awk, geek
Posted in awk, geek | No Comments »
Awk is a programming language, which I only use in it’s most basic form. Quite often I need to format a few lines of text, as is the case with an OD password reset script I’m working on. (more…)
Thursday, October 9th, 2008 |
Tags: ard, geek, os x, sysadmin
Posted in applescript, awk, bash, os x, sysadmin | No Comments »
If you administrate a number of Mac clients you’ll no doubt be familiar with Apple’s Remote Desktop. As is the case with most software additional functionality becomes available in new release and ARD is no exception. Hence the ARD client version is a relevant piece of information and when I needed to get the information from a user without using Remote Desktop itself I came up with the following code. (more…)
Thursday, October 9th, 2008 |
Tags: geek, os x
Posted in os x, ruby | No Comments »
I’ve been using a shell script to list any tracks open with in iTunes for quite some time now; I’m doing this so I can work out what people are streaming over Bonjour. I’ve been piping the output to my desktop using GeekTool but recently decided the output was ugly and needed some reformatting. Ruby, I need you my darling! (more…)
Wednesday, August 27th, 2008 |
Tags: geek, iphone, itunes, playlist
Posted in iphone, itunes | No Comments »
If you’re anything like me you use all sorts of tricks to bounce tracks from playlist to playlist in iTunes with smart playlists picking up rated tracks that you haven’t listened to and pushing them to you iPhone etc. Well, today I decided to manually manage tracks on my iPhone and as a result started tinkering with iPhone only playlists. (more…)
Tuesday, August 26th, 2008 |
Tags: geek, postfix, sysadmin
Posted in awk, bash, sysadmin | 2 Comments »
One of the mail servers I manage was blocked up to the hilt with sixteen thousand emails sent to a specific recipient. This meant no one could send or receive email in the office until Postfix had delivered the messages. Only problem was these messages weren’t going anywhere. To make matters worse, the queue contained important emails that had to be delivered! (more…)
Thursday, August 14th, 2008 |
Tags: bash, geek, shell, tab, terminal
Posted in applescript, bash, geek | No Comments »
Just a quick snippet I’m using to open a new tab in Terminal. It accepts a single, optional argument which will override cd’ing to the working directory.
#!/usr/bin/env bash
if [[ $# -eq 0 ]]; then
dir=`pwd`
else
dir=$1
fi
/usr/bin/osascript \
-e "tell app \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down" \
-e "tell app \"Terminal\" to do script \"cd $dir\" in front window" \
-e "tell app \"System Events\" to tell process \"Terminal\" to keystroke \"l\" using control down"
I’ve put the shell script in “/usr/local/bin” as this is in my $PATH. I’ve named the script “tab” so whenever in Terminal I can enter “tab” to open a new tab with the current working directory ready and waiting. Very useful when working with Rails and multiple shells.
Saturday, August 2nd, 2008 |
Tags: apache, geek, mod_deflate, unix
Posted in sysadmin | No Comments »
If you’re running an Apache web server and you want to speed up your visitor’s browsing you can enable mod_deflate, which has replaced mod_gzip in Apache 2.
You’ll probably find your mod_default module is already installed and available with just a couple of lines of configuration. (more…)