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
| # 初期ロードモジュール | |
| my %init_module = (); | |
| $init_module{$_}++ for keys %INC; | |
| # getter | |
| sub get_module { | |
| return \%init_module; | |
| } | |
| # trigger |
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
| diff --git lib/Net/Amazon/EC2.pm lib/Net/Amazon/EC2.pm | |
| index a2062a7..2f9a318 100644 | |
| --- lib/Net/Amazon/EC2.pm | |
| +++ lib/Net/Amazon/EC2.pm | |
| @@ -1782,9 +1782,11 @@ sub describe_instances { | |
| my $tag_sets; | |
| foreach my $tag_arr (@{$instance_elem->{tagSet}{item}}) { | |
| + my $key = $tag_arr->{key}; | |
| + my $value = (ref $tag_arr->{value} eq '') ? $tag_arr->{value} : ''; |
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 Getopt::Long qw/GetOptions :config auto_help/; | |
| use Config::Pit; | |
| use VM::EC2; | |
| use Term::ReadLine; | |
| my $pitname = 'aws_info'; | |
| my $region = ''; |
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/perl | |
| use strict; | |
| use warnings; | |
| use AnyEvent::Twitter::Stream; | |
| use AnyEvent; | |
| use Encode qw/encode_utf8/; | |
| use Net::Twitter::Lite; | |
| use Log::Minimal; | |
| use Data::Dumper; | |
| use Clone qw/clone/; |
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
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use List::Util qw/first shuffle/; | |
| use Benchmark qw(timethese cmpthese); | |
| use 5.10.0; | |
| my $count = shift || 1; | |
| my $dbg = ($count == 1) ? 1 : undef; |
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
| use strict; | |
| use VM::EC2; | |
| my $owner_id = $ENV{EC2_OWNER_ID} or die 'EC2_OWNER_ID is required.'; | |
| #my $owner_id = shift or die 'aws_status.pl <owner_id>'; | |
| my $ec2 = VM::EC2->new; | |
| my @regions = $ec2->describe_regions(); | |
| for my $region (@regions) { | |
| # region |
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
| $ cat sorttest.txt | |
| a20jae | |
| a2ueyO | |
| AeRezo | |
| aLrl58 | |
| aryHoV | |
| As3jL3 | |
| aS40ft | |
| Aswonj | |
| awviEw |
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
| #### node.js | |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/counterdb'); | |
| var Schema = mongoose.Schema; | |
| var CounterSchema = new Schema({ | |
| count: Number | |
| }); | |
| mongoose.model('Counter', CounterSchema); | |
| var Counter = mongoose.model('Counter'); |
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
| % git diff style.less <master ✗> | |
| diff --git a/style.less b/style.less | |
| index 01448e8..c41709a 100644 | |
| --- a/style.less | |
| +++ b/style.less | |
| @@ -31,7 +31,7 @@ img { | |
| } | |
| } | |
| -ul.day-list { |
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
| % diff -u lib/redmine_irc_notifications/irc.rb-org lib/redmine_irc_notifications/irc.rb <master ✗> | |
| --- lib/redmine_irc_notifications/irc.rb-org 2011-10-29 01:24:12.000000000 +0900 | |
| +++ lib/redmine_irc_notifications/irc.rb 2011-10-29 01:17:07.000000000 +0900 | |
| @@ -47,8 +47,9 @@ | |
| end | |
| sock = TCPSocket.open(@@server, @@port || 6667) | |
| - sock.puts "USER #{@@user} 0 * #{@@user}" | |
| sock.puts "NICK #{@@nick}" | |
| + sock.puts "USER #{@@user} 0 * #{@@user}" |