GFX::Monk Home

- page 19

Site do-over

I’ve re-done the site slightly, so hopefully there aren’t too many broken things left lying about the place. I’ve now moved to using Jekyll, which is a “blog-aware static site generator”.

Basically, it allows me to keep my posts on disk (in git, of course) as a series of markdown files - one per post. I can also prefix each file with some yaml metadata, such as tags. This all means I can just write my posts offline, in my editor of choice. It seems to me a much cleaner approach than the unwieldy php4/mysql site I was using before - every time I had to fix an issue, I winced at PHP and the fact that I couldn’t always reproduce the issues my server was having, leading me into the stressful land of debugging and modifying a live site.

Plus, in the unlikely event that I get slashdotted, I’ll be ready ;).

Fixing Jekyll

It hasn’t been all rosy though. I’ve had to fix a number of issues or omissions I’ve found in jekyll, and that is already on top of an unofficial branch to better support tagging - not the most stable environment. The fact that there are almost 250 forks on github alone worries me though - either nobody is sending patches upstream, or upstream is not very receptive to said patches. It makes for a fairly hectic landscape.

FTP Sync - not as simple as you might expect

Oh, and the fairly awful state of FTP synchronisers for linux is surprising. I eventually got the sitecopy program to work for me, but not without a lot of complaining on its part. And this was after trying 3 other FTP syncing programs, none of which could even complete a single update before dying of various causes. Admittedly, this is mostly a problem because I don’t have SSH access. rsync would work wonderfully, otherwise…

Bash trick: indicate whether a session is running under SSH

It’s worrying how often I execute a command on the wrong machine because I don’t notice the hostname in my bash prompt. So I eventually figured out a way to make it more obvious. This is the relevant part of my ~/.bashrc:

# colours
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
MAGENTA=`tput setaf 5`
CYAN=`tput setaf 6`
WHITE=`tput setaf 7`
LIGHT=`tput setaf 9`
GREY=`tput setaf 0`

# make remote sessions stand out
HOSTNAME_COLOR="$YELLOW"
[ "$SSH_CLIENT" ] && HOSTNAME_COLOR="$RED"

# string it all together:
PS1='\[$GREEN\]\u\[$HOSTNAME_COLOR\]@\h \[$CYAN\]\w\[$GREEN\] \$\[$LIGHT\] '

The colours stuff is pretty standard, the crucial part is [ "$SSH_CLIENT" ] && HOSTNAME_COLOR="$RED". You can do anything in here to make a remote session stand out.

One Book, Many Readings

Christian Swinehart’s beautiful infographics and interesting analysis of choose your own adventure books.

(view link)

Lauren McCarthy's Happiness Hat

It measures your smile and stabs you if you’re not smiling sufficiently [via waxy.org]

(view link)

Is there such thing as a Snapping Window Manager?

..in which I propose a potentially-new window management feature, and hope that somebody has already done it so that I won’t have to…

Looking Forward to Being Attacked - Awful Library Books

chapter 4: “Life affords few pleasures that can equal the striking of vulnerable areas!”

I love that almost every single chapter ends with an exclamation mark. via nys :)

(view link)