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 | |
use strict; | |
# Author: Michael Goerz <[email protected]> | |
# Make sure that $kextfile is owned by root! | |
my $app = '/Applications/InsomniaX.app'; | |
my $kextfile = "$app/Contents/Resources/Insomnia_r6.kext/"; | |
sub close_insomnia_x{ | |
my $ps_line = `ps -A | grep $app | grep -v grep`; |
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 utf8; | |
############################################################################ | |
# Copyright (C) 2008 by Michael Goerz # | |
# http://www.physik.fu-berlin.de/~mgoerz # | |
# # | |
# This program is free software; you can redistribute it and/or modify # | |
# it under the terms of the GNU General Public License as published by # | |
# the Free Software Foundation; either version 3 of the License, or # |
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; | |
# This program adds a function 'printself' to the end of an existing | |
# perl program, which prints out the entire program's listing. This | |
# will make the existing program to be a Quine | |
# (c)2006 Michael Goerz | |
# michaelgoerz.net | |
# This program is free software; you can redistribute it and/or modify |
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; | |
my $historyfile = glob '~/.filter.pl.last'; | |
my $command = ""; | |
system("touch $historyfile"); | |
open(HIST, "$historyfile") or die "Can't open file: $!"; | |
$command = <HIST>; |
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; | |
my $recursive = 'true'; | |
md5sum(\@ARGV); | |
sub md5sum{ | |
my $filelist = shift; | |
foreach my $file (@{$filelist}){ | |
if ( -f $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/bin/perl -w | |
use strict; | |
my $recursive = 'false'; | |
if ($ARGV[0] eq '-r') { | |
$recursive = shift @ARGV; | |
$recursive = 'true'; | |
} | |
decrypt(\@ARGV); |
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; | |
my %files; | |
my @ignorepatterns = (); | |
my $defaultselection = 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/bin/perl -w | |
use strict; | |
use threads; | |
# (c) 2007 Michael Goerz <[email protected]> | |
# usage: | |
# scan [pdffile] | |
# Prerequisites: | |
# iText (http://www.lowagie.com/iText/) |
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; | |
my @devicelist = </dev/sdb?>; # order is important: first found device ist default | |
my %mountpaths = ( qr"/dev/sd??" => '/mnt' ); # default paths | |
my $UID = 'goerz'; # the user id the device is mounted as | |
my $GID = 'users'; # the group id the device is mounted as | |
my $FMASK = '000'; # the permissions of the mounted device (masked) | |
my $UMOUNT = '/home/goerz/bin/umountstick'; # the name of the script that should be written for umounting | |
my $TRFILE = '/home/goerz/.usbmounts'; # file used for tracking which devices are mounted |
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
NOTE: I am using bash for this. | |
NOTE2: Another approach for getting tmux would be to use gentoo-prefix or netbsd's pkgsrc. I | |
didn't have too much luck with gentoo-prefix. NetBSD was pretty straight forward but it had | |
an old version of tmux (1.1). | |
Here is how to get tmux compiled if you can get your systadmins to installed it ... or | |
any other weird reason. I assume you have some basic libraries and headers installed (like | |
ncurses, etc...). If not, you'll have to compile those ones too. |
OlderNewer