Skip to content

Instantly share code, notes, and snippets.

@anazawa
anazawa / freebsd.sh
Last active February 21, 2017 15:11
Running KGS Protocol Translator on Jetty9
# Daemonize
vi /usr/local/etc/jetty/jetty
echo jetty_enable="YES" >> /etc/rc.conf
service jetty start
@anazawa
anazawa / yoshimoto-speech-scripts.pl
Last active August 29, 2015 14:27
Fetch Takaaki Yoshimoto speech scripts (http://www.1101.com/yoshimoto_voice/)
#!/usr/bin/env perl
use strict;
use warnings;
use autodie qw/rename/;
use Archive::Zip qw/AZ_OK/;
use Getopt::Long qw/GetOptions/;
use HTTP::Tiny;
use Path::Class qw/tempdir/;
use Pod::Usage qw/pod2usage/;
use Time::HiRes qw/sleep/;
@anazawa
anazawa / sgf2json.md
Last active March 11, 2025 14:38
JSON representation of SGF (Smart Go Format)

Basic Structure

SGF's Node is JSON's object

A node is an object whose keys are property names and whose values are the corresponding values. The value types are defined later.

SGF:

package Goban;
use strict;
use warnings;
use parent 'Games::Go::SimpleBoard';
use Games::Go::SimpleBoard;
use Goban::Image;
sub new {
my $class = shift;
my $size = shift || 19;
#!/usr/bin/env perl
use 5.014_004;
use strict;
use warnings;
use List::Util qw/first/;
use Time::Piece;
use Time::Seconds;
our $VERSION = '0.03';
#!/usr/bin/env perl
use strict;
use warnings;
use Time::Piece;
use Time::Seconds;
our $VERSION = '0.02';
my $file_system = shift || '/';
#my $backupdir = '/backup/esprimo';
#!/usr/bin/env perl
use strict;
use warnings;
use Time::Piece;
use Time::Seconds;
our $VERSION = '0.01';
my $device = '/dev/ada0p2';
#my $backupdir = '/backup/esprimo';
#!/usr/bin/env perl
use strict;
use warnings;
use Time::Piece;
use Time::Seconds;
our $VERSION = '0.01';
my $device = '/dev/ada0p2';
#my $backupdir = '/backup/esprimo';
#!/usr/bin/env perl
use strict;
use warnings;
use Time::Piece;
use Time::Seconds;
my $filesystem = shift || '/dev/ada0p2';
my %alias = ( '/dev/ada0p2' => 'root' );
my $backupdir = '/backup';
@anazawa
anazawa / Header.pm
Created April 4, 2013 20:51
Blosxom Plug-in: static and conditional_get
package Blosxom::Header;
use strict;
use warnings;
use parent 'CGI::Header::Props';
our $INSTANCE;
sub new {
require Carp;
Carp::croak "Private method 'new' called for $_[0]";