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/python | |
""" | |
Reads message from stdin, pgp encrypts, launch mailto: url to send with mail app. | |
I use this to send pgp messages from within vim. | |
First i type a message like this: | |
---- | |
Subject: test | |
To: person@example.com |
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/bash | |
bkdir= | |
while [[ -n "$1" ]]; do | |
cd $(dirname "$1") | |
realpath=$(pwd -P) | |
case "$realpath" in | |
/Volumes/*) | |
realpath=${realpath:9} | |
;; |
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/bash | |
if [[ $(id -u) -ne 0 ]]; then | |
sudo $0 "$@" | |
exit $? | |
fi | |
diff <(sleep 1 ; lsof -n -P| grep -v "^\(sleep\|lsof\|grep\|diff\|bash\)" ) <(lsof -n -P| grep -v "^\(sleep\|lsof\|grep\|diff\|bash\)" ) |
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 | |
tr -d "\r" | tr "\n\\" "\0/" | xargs -0 "$@" |
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/sbin/dtrace -s | |
syscall::open*:entry { | |
this->exe= execname; | |
this->file= copyinstr(arg0); | |
this->mode= arg1; | |
} | |
syscall::open*:return { | |
printf("%4d (%4d) %-20s\tM%07o %s",arg0, errno, this->exe, this->mode, this->file); | |
} |
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/sbin/dtrace -s | |
#pragma D option quiet | |
syscall::exec*:entry | |
{ | |
printf("exec %s -> %s\n", execname, copyinstr(arg0)); | |
} | |
proc:::exec-failure |
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
# (C) 2003-2007 Willem Jan Hengeveld <itsme@xs4all.nl> | |
# Web: http://www.xs4all.nl/~itsme/ | |
# http://wiki.xda-developers.com/ | |
# | |
# attempt to make complicated template symbols more readable | |
# | |
# $Id: $ | |
# | |
use strict; | |
use warnings; |
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 -w | |
# (C) 2003-2007 Willem Jan Hengeveld <itsme@xs4all.nl> | |
# Web: http://www.xs4all.nl/~itsme/ | |
# http://wiki.xda-developers.com/ | |
# | |
# $Id$ | |
# | |
use strict; | |
use IO::File; | |
use Getopt::Long qw(:config no_ignore_case); |
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 -w | |
# (C) 2003-2007 Willem Jan Hengeveld <itsme@xs4all.nl> | |
# Web: http://www.xs4all.nl/~itsme/ | |
# http://wiki.xda-developers.com/ | |
# | |
# $Id$ | |
# | |
use strict; |
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 -w | |
use strict; | |
use Getopt::Long; | |
use POSIX; | |
# todo: convert back to time in output | |
sub parseint { | |
return $_[0]; | |
} |
OlderNewer