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 motd() { | |
echo "------------------------------------------------------------------------------" | |
cat ~/.motd | |
echo "------------------------------------------------------------------------------" | |
} | |
function vm() { | |
$EDITORI ~/.motd |
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 | |
#Source: https://gist.github.com/alicraigmile/cc83201e07ddc8472765 | |
function welcome() { | |
HOUR=$(date +%H) | |
HOUR=$(expr $HOUR + 0) #fix for leading zeros | |
NAME=$(finger $USER |head -n1 |cut -d : -f3 | sed -e 's/^ *//' | cut -d ' ' -f1) #firstname (remove last 'cut' for full name) | |
if [[ $HOUR -lt 5 ]]; then |
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 | |
#Switch between BBC (Reith) Network and Direct Connection on a BBC Desktopped Mac OS X machine | |
function bbc-on-network() { | |
scselect "BBC On Network" | |
} | |
function bbc-off-network() { | |
scselect "BBC Off Network" |
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
shortcut on desktop | |
desktop-shortcut() { | |
osascript -e "tell application \"Finder\" to make new alias file at desktop to POSIX file \"$(myreadlink $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
# Usage: add 'ProxyCommand ~/.ssh/proxy %h %p' to your ~/.ssh/config file | |
#set -x | |
connect_directly() { | |
nc -X 5 $1 $2 | |
} | |
connect_to_host_outside_the_bbc_from_within() { | |
nc -x "socks-gw.reith.bbc.co.uk:1085" -X 5 $1 $2 |
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
# Launch TextEdit to edit documents graphically | |
gedit() { | |
osascript -e "tell application \"TextEdit\" to open POSIX file \"$1\"" -e "tell application \"TextEdit\" to activate" | |
} |
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 perl | |
# Prototype wiki markup converter - given trac format wiki code on STDIN, | |
# convert it to confluence format. | |
# | |
# Last updated: 12/Jun/2008 | |
# (c) 2008 Ali Craigmile | |
# | |
# Usage: | |
# cat trac-wiki-code.txt | ./trac2confluence.pl |
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/sh | |
MAXTUNER=46 | |
i=0 | |
while [ $i -lt $MAXTUNER ]; | |
do | |
rmmod tuner saa7134 saa7134-alsa | |
modprobe saa7134 card=70 tuner=$i | |
modprobe saa7134-alsa | |
echo "Actual tuner is:" $i | |
sleep 1 # this is to make sure /dev/video is registered when tvtime starts |
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/perl | |
use strict; | |
use warnings; | |
use Getopt::Std; | |
use constant DEFAULT_DEST => '/content/Media/Pictures'; | |
use constant FATAL => 1; | |
our %opts = (); #eek - nasty hack alert!!! |
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
On Error Resume Next | |
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000 | |
Const E_ADS_PROPERTY_NOT_FOUND = &h8000500D | |
Const ONE_HUNDRED_NANOSECOND = .000000100 | |
Const SECONDS_IN_DAY = 86400 | |
Set objADSystemInfo = CreateObject("ADSystemInfo") ' LINE 8 | |
Set objUser = GetObject("LDAP://" & objADSystemInfo.UserName) ' LINE 9 |