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 | |
# Gmail notes converter | |
# by Jon Jensen <[email protected]> | |
# 2009-07-20 | |
# Copyright 2009 Jon Jensen. Distributed under the GPLv3 license. | |
# For details see http://www.gnu.org/licenses/gpl-3.0.html | |
# When importing e.g. Nokia phone contacts into Gmail, most fields are |
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 | |
# A simple web server that just listens for textarea filter requests | |
# and runs an editor to manipulate the text. Is intended to be | |
# used with the TextAid extention for Chrome. | |
use strict; | |
use warnings; | |
use threads; | |
use threads::shared; | |
use Socket; |
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
--- edit-server.orig 2010-01-04 20:13:01.000000000 -0700 | |
+++ edit-server 2010-01-04 20:12:34.000000000 -0700 | |
@@ -73,7 +73,7 @@ | |
} | |
my $len = $header{'content-length'}; | |
- unless ($len) { | |
+ unless (length $len) { | |
http_header($fh, 500, 'Invalid request -- no content-length.'); | |
close $fh; |
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/perl | |
use strict; | |
use warnings; | |
use Encode; | |
use IsUTF8 'isUTF8'; | |
binmode(STDIN); | |
binmode(STDOUT); | |
binmode(STDERR); |
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 Time::HiRes 'usleep'; | |
while (1) { | |
open my $in, '<', '/proc/sys/kernel/random/entropy_avail' or die; | |
print <$in>; | |
close $in; |
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 JSON; | |
my $json = JSON->new; | |
undef $/; | |
while (<>) { | |
print $json->pretty->encode($json->decode($_)); | |
} |
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
/** | |
* Convenience method to create a MediaPlayer for a given resource id. | |
* On success, {@link #prepare()} will already have been called and must not be called again. | |
* <p>When done with the MediaPlayer, you should call {@link #release()}, | |
* to free the resources. If not released, too many MediaPlayer instances will | |
* result in an exception.</p> | |
* | |
* @param context the Context to use | |
* @param resid the raw resource id (<var>R.raw.<something></var>) for | |
* the resource to use as the datasource |
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 [email protected] Tue Apr 2 12:02:15 2002 | |
Date: Fri, 22 Mar 2002 17:05:37 -0600 | |
From: pbg <[email protected]> | |
To: [email protected] | |
Subject: diff | |
--- X Fri Mar 22 17:03:55 2002 | |
+++ lib/Vend/Data.pm Fri Mar 22 17:03:00 2002 | |
@@ -191,7 +191,9 @@ | |
return '' unless defined $db->test_column($field_name); |
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
# Linux's default source address selection for multiple IPv6 addresses on the | |
# same interface leaves a lot to be desired. See: | |
# http://www.akkadia.org/drepper/linux-rfc3484.html | |
# | |
# The RFC 3484 method described there and used in gai.conf feels like the | |
# wrong way to me, so I used the approach documented here: | |
# http://www.davidc.net/networking/ipv6-source-address-selection-linux | |
# and mark all but the main IPv6 source address as "deprecated" so they | |
# won't be used as default source addresses (but otherwise function fine). | |
# |
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/perl | |
use strict; | |
use warnings; | |
use Proc::ProcessTable; | |
my $table = Proc::ProcessTable->new; | |
for my $process (@{$table->table}) { | |
# skip root processes |
OlderNewer