I hereby claim:
- I am f99aq8ove on github.
- I am f99aq8ove (https://keybase.io/f99aq8ove) on keybase.
- I have a public key ASDlDUOrJ9iwcuK35e46gPOwdiEodKSeOhWQ9V_nGwGPEQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use encoding 'utf-8'; | |
use Unicode::Normalize; | |
use File::Basename qw/fileparse/; | |
use Getopt::Long; | |
my $noexecute = 0; |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Spec; | |
use Getopt::Long; | |
use Pod::Usage; | |
use Data::Dumper; |
#!/bin/sh -e | |
ldd_list=$(mktemp -t lddlist) | |
if [ $? = 0 ]; then | |
trap "rm -f '$ldd_list'" EXIT | |
fi | |
set +e | |
ldd /usr/local/bin/* /usr/local/lib/*.so* > "$ldd_list" 2> /dev/null | |
set -e |
--- a/Stream.pm 2011-01-23 00:27:05.243140965 +0900 | |
+++ b/Stream.pm 2011-01-23 00:28:17.402025511 +0900 | |
@@ -154,7 +154,7 @@ | |
my($handle, $json) = @_; | |
# Twitter stream returns "\x0a\x0d\x0a" if there's no matched tweets in ~30s. | |
$set_timeout->(); | |
- if ($json) { | |
+ if ($json && $json =~ /^{/) { | |
my $tweet = $decode_json ? JSON::decode_json($json) : $json; | |
if ($on_delete && $tweet->{delete} && $tweet->{delete}->{status}) { |
--- a/portupgrade 2010-11-14 14:46:24.112307993 +0900 | |
+++ b/portupgrade 2010-11-14 14:47:29.271209261 +0900 | |
@@ -1001,7 +1001,7 @@ | |
rescue IgnoreMarkError => e | |
$results << PkgResult.new(origin, :ignored, pkgname) | |
rescue => e | |
- $results << PkgResult.new(origin, e, pkgname) | |
+ $results << PkgResult.new(origin.nil? ? "nil" : origin, e, pkgname) | |
ensure | |
$use_packages, $use_packages_only = use_packages, use_packages_only |
package MyCassandra; | |
use Any::Moose; | |
use namespace::autoclean; | |
use Net::Cassandra; | |
use Data::MessagePack; | |
use Data::Dumper; | |
use Encode; | |
has 'keyspace' => (is => 'ro', isa => 'Str'); |
#!/bin/sh | |
# | |
# zfs snapshot auto-rotation | |
# | |
# usage: zfs_snapshot.sh <mountpoint> <snapshot name> <number of keeping snapshots> [recursive] | |
# | |
# recursive option: Recursively create snapshot (zfs snapshot -r) | |
# | |
# for crontab | |
# |
#!/bin/sh | |
for i in `perl -nle'print "https://launchpad.net/~$1/+archive/ppa" if m!deb\s+http://ppa\.launchpad\.net/(.+?)/!' /etc/apt/sources.list`; do | |
wget -q -O- "`wget -q -O- "$i" | perl -nle'print "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x$1" if m!"http://keyserver.ubuntu.com:11371/pks/lookup\?search=.+?([[:xdigit:]]{16})&!'`" | sudo apt-key add - | |
done |
#!/bin/sh | |
# | |
# CPU frequency from sysctl | |
# | |
if [ "$1" = "config" ]; then | |
echo "graph_title CPU frequency" | |
echo 'graph_category system' | |
echo "graph_info This graph shows the cpu frequency" | |