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
package new; | |
use strict; | |
use warnings; | |
our $VERSION = 0.01; | |
=head1 NAME | |
new - shortens require Foo; Foo->new(...) to just one call |
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 | |
PIC=$1 | |
SND=$2 | |
OUT=$3 | |
if [ -z "$SND" ]; then | |
echo "Usage: $0 <image> <audio> [<video>]" | |
echo "Default for video is audio renamed to *.mp4" | |
exit 1 |
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/env perl | |
# This script tests nothing (except the fact that modules load w/o warnings). | |
# However, it tries to load them all. | |
# This means that untested modules would also be included into | |
# code coverage summary, lowering total coverage to its actual value. | |
# I.e. having a well-covered module and a totally uncovered one will result | |
# in 50% coverage which is probably closer to truth. |
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/env python | |
import cgi | |
class safe: | |
def __init__(this, text): | |
this.content = text | |
def __str__(this): | |
return safe.current_method(this) | |
def as_is(this): |
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 Data::Dumper; | |
my $besterr = 1000; | |
foreach my $i ( 5..100 ) { | |
my ($err, $notes) = find_all( 2**(1/$i), qw(3/2 4/3 5/4 6/5 9/8) ); | |
next if $err > 1.5*$besterr; |
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/env perl | |
use warnings; | |
use strict; | |
$| = 1; | |
my @data; | |
while (<>) { | |
/\S/ or next; |
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 Term::ReadKey; | |
END{ ReadMode(0) }; | |
ReadMode('noecho'); | |
$|=1; | |
# read password twice |
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 | |
# | |
# Copyright (c) 2007 Andy Parkins | |
# | |
# An example hook script to mail out commit update information. This hook | |
# sends emails listing new revisions to the repository introduced by the | |
# change being reported. The rule is that (for branch updates) each commit | |
# will appear on one email and one email only. | |
# | |
# This hook is stored in the contrib/hooks directory. Your distribution |
NewerOlder