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; | |
use warnings; | |
=pod | |
check_time.pl | |
This script automatically resets a virtual machine's system time after the | |
host resumes from sleep. This is handy e.g. when using vmware on a laptop. |
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; | |
use warnings; | |
use File::Path; | |
# This script pulls in subversion files and history into a git repo. | |
# The subversion files are merged into the master branch under a specific | |
# subdirectory. This is useful if you have multiple svn repos that you want | |
# track in a single git repo, with a separate directory for each repo. |
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 | |
# This automates (more or less) the process described at http://trac.macports.org/wiki/Migration | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
port installed active | /usr/bin/perl -p -e 'undef $_ unless $b++; # the first line is info for humans | |
s/^\s*(.*)\s*\(active\).*/$1/; s/\s\@[^+\n]+//; # remove (active) and the version number | |
s/(\+[^+\n]+)/ $1/g' > active.macports # put spaces before each + | |
port clean --all all | |
port -f uninstall installed |
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 warnings; | |
use Benchmark qw(:all); | |
use YAML::Syck (); | |
use Data::Dumper (); | |
use Storable (); | |
use JSON::XS (); | |
use YAML::XS (); |
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
From: Niko Tyni <ntyni@debian.org> | |
Subject: Add support for Abstract namespace sockets. | |
Closes: 490660, 329291 | |
blead commits | |
99f13d4c3419e967e95c5ac6a3af61e9bb0fd3c0 | |
89904c08923161afd23c629d5c2c7472a09c16bb | |
by Lubomir Rintel <lkundrak@v3.sk> | |
trivially backported for 5.10.1 by Niko Tyni <ntyni@debian.org> |
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 | |
while read i | |
do echo "$i"; for w in $(echo "$i" | aspell list) | |
do echo "$w" | aspell pipe | grep --color=auto '^&' | |
done | |
done |
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
# modules/nfs/manifests/init.pp | |
class nfs_server { | |
file { "destroy_exports": | |
path => "/etc/exports.puppet", | |
ensure => present, | |
source => "puppet://$servername/modules/nfs/empty", | |
} | |
package { "portmap": |
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 | |
sub divide { | |
($a, $b) = @_; | |
$c = eval { $a / $b }; | |
$@ =~ m/Illegal division by zero/ && rand() > .5 ? ($b = 1) : ($b = -1); | |
$@ && ($c = $a / $b); | |
return $c; | |
} |
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
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
auto bond0 | |
iface bond0 inet manual | |
# bizarre, but this works... |
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; | |
use warnings; | |
use Getopt::Long; | |
use Digest::SHA1 qw(sha1_base64); | |
my $hash; | |
GetOptions("hash" => \$hash); |
OlderNewer