This file contains hidden or 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 strict; | |
use warnings; | |
use utf8; | |
use 5.12.0; | |
use Path::Class; | |
use Getopt::Long; | |
use Pod::Usage; |
This file contains hidden or 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 | |
# apache,fluent-plugin-s2が依存するパッケージをインストール | |
yum -y install httpd.x86_64 \ | |
libxml2-devel.x86_64 libxslt-devel.x86_64 | |
# td-agent 用のリポジトリを登録 | |
cat <<_EOT_ 1>/etc/yum.repos.d/td.repo | |
[treasuredata] | |
name=TreasureData |
This file contains hidden or 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 5.12.0; | |
use warnings; | |
use utf8; | |
use YAML; | |
use List::Util qw/shuffle/; | |
my $arr = [1..50]; | |
my $split_unit = 10; |
This file contains hidden or 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
if ( | |
長い条件 || | |
長い条件 | |
){ | |
... | |
} |
This file contains hidden or 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 strict; | |
use warnings; | |
use utf8; | |
=head1 SYNOPSIS | |
% md_preview.pl markdown.md | |
=cut |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.github.mxcl.homebrew.daemontools</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/svscanboot</string> | |
</array> |
This file contains hidden or 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 strict; | |
use warnings; | |
use Filesys::Notify::Simple; | |
use Spork; | |
my $watcher = Filesys::Notify::Simple->new(['./Spork.slides']); | |
my $spork_command = Spork->new->load_hub->command; | |
while (1) { | |
$watcher->wait(sub { |
This file contains hidden or 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
has num => (is => 'rw', isa => 'Int', required => 1, trigger => sub {shift->clear_all} ); | |
has double => (is => 'rw', isa => 'Int', default => sub { shift->num * 2 }, clearer => 'clear_all'); | |
has triple => (is => 'rw', isa => 'Int', default => sub { shift->num * 3 }, clearer => 'clear_all'); |
This file contains hidden or 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 5.014; | |
use warnings; | |
use utf8; | |
use autodie; | |
use common::sense; | |
use LWP::Simple (); | |
use Web::Query; | |
use YAML; |
This file contains hidden or 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 MyApp::DB; | |
use 5.016; | |
use warnings; | |
use utf8; | |
use Time::Piece::Plus; | |
use Class::Method::Modifiers; | |
use Teng::Schema::Loader; | |
use MyApp::DB::ResultSet; | |
use MyApp::Exception; |