This file contains 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 | |
# | |
RCFILE=$HOME/.vonage | |
PREFIX='1' | |
#if [ a$1 = a ] | |
#then | |
# printf '\n\nUsage: dial \n\n' | |
# exit | |
#fi |
This file contains 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/local/bin/ruby | |
require 'rubygems' | |
require 'mail' | |
require 'appscript'; include Appscript | |
require 'iconv' | |
message = STDIN.read | |
mail = Mail.new(message) |
This file contains 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
require 'formula' | |
class Fetchmail < Formula | |
# note that the following url is actually a javascript redirection. | |
# download the associated file and place it into /Library/Caches/Homebrew | |
homepage 'http://www.fetchmail.info/' | |
url 'http://prdownload.berlios.de/fetchmail/fetchmail-6.3.21.tar.bz2' | |
# md5 '548f152df27d32b632afa4f1a8a6cd1a' | |
md5 '0ad8eac47e85bd0ae63870daa09992af' |
This file contains 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
javascript:(function(){ | |
var w=window,d=document,selectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageUri=w.location.href,isGMail=w.location.host.match(/mail\.google\.com/),subject=d.title,source; | |
if(isGMail){ | |
var msgFrm=d.getElementById("canvas_frame"),subjectSpans; | |
if(msgFrm){ | |
subjectSpans=msgFrm.contentDocument.getElementsByClassName("hP"); | |
if(subjectSpans)subject=subjectSpans[0].innerText; | |
}; | |
if(!subjectSpans){ | |
subject=d.title.substring(d.title.indexOf("-")+1,d.title.lastIndexOf("-")).replace(/^%20+/,"").replace(/%20+$/,"") |
This file contains 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
(setq edit-server-url-major-mode-alist | |
'( | |
("github\\.com" . markdown-mode) | |
("wikicentral\\.*" . confluence-mode) | |
)) |
This file contains 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 | |
# -*- mode: cperl; c-basic-offset: 2; indent-tabs-mode: nil -*- | |
open (INFILE, "<$ARGV[0]") || die "ERROR: opening $ARGV[0]\n"; | |
while (<INFILE>) { | |
my @traffic = split(',', $_); | |
next if $#traffic <= 1; # skip the cruft lines in the input file. | |
my $lt1 = int2addr($traffic[2]); | |
my $rt1 = int2addr($traffic[3]); |
This file contains 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 | |
# -*- mode: cperl; c-basic-offset: 2; indent-tabs-mode: nil -*- | |
use Statistics::Descriptive; | |
#fields within the output file | |
# 00 - Rx Port Name | |
# 01 - Comp32 | |
# 02 - Comp16_1 (src_addr lt) - the following four fields need to be merged into | |
# 03 - Comp16_2 (src_addr rt) a valid IP addrss |
This file contains 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
#!/opt/local/bin/perl | |
use JSON; | |
use Data::Dumper; | |
my $debug = 0; | |
my @json_dump = (); | |
open(JSON, "$ARGV[0]") || die "error opening: $ARGV[0]\n"; |
This file contains 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 | |
# | |
RCFILE=$HOME/.ipphone | |
PREFIX='91' | |
#if [ a$1 = a ] | |
#then | |
# printf '\n\nUsage: dial <dial string>\n\n' | |
# exit | |
#fi |
This file contains 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/zsh | |
CHK_URL="http://test-destination-host" | |
# note you need to redireect STDERR -> STDOUT since wget outputs the headers on STDERR | |
HEADERS=`wget --server-response --spider --quiet -T 1 -t 1 ${CHK_URL} 2>&1` | |
HEADERS_RET=$? | |
if [[ ${HEADERS_RET} == 4 ]] { | |
echo "some sort of network error occurred" |
OlderNewer