This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function @() | |
{ | |
if [ $? = 127 ] | |
then | |
PROGRAM=$(history 2 | head -n 1 | tr -s \ \ | cut -f3 -d\ | tr -d '[:space:]') | |
PATTERN="/s?bin/$PROGRAM\$" | |
SHORT_PATTERN="$PROGRAM" | |
elif [ $1 != "" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from atomicfile import AtomicFile | |
import feedparser | |
import os | |
import re | |
import urllib2 | |
import urlparse | |
feed = feedparser.parse("http://www.tatw.co.uk/podcast.xml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN: Put this in ~/.bashrc | |
function err_handle { | |
if [ "$?" != 0 ] | |
then | |
if echo "$previous_command" | grep -q '\<hlep\>' | |
then | |
NEW_COMMAND="$(echo "$previous_command" | sed 's/\<hlep\>/help/g')" | |
echo -ne "Command failed. Retry with '$NEW_COMMAND' (y/n)? " | |
read p |
NewerOlder