Skip to content

Instantly share code, notes, and snippets.

View JEEN's full-sized avatar

Jeen Lee JEEN

View GitHub Profile

좋은 모듈을 고르는 좋은 방법

저자

@JEEN_LEE - 세작, 사쿠라, 쁘락치, github:jeen

시작하며

[CPAN Testers Statistics][url-stats-cpantesters] 에서 확인할 수 있는 것처럼 현재 CPAN 에 등록된 모듈은 3만여개에 가깝습니다. 많은 모듈이 있다는 것은 좋은 것입니다. 하지만 모든 모듈이 다 좋은 것은 아닙니다. A 라는 일을 하기 위한 모듈이 수십여개가 되는 경우에는 도대체 무엇을 골라야 할 지 난감해지기 마련입니다. 그럼 우리는 어떻게 좋은 모듈을 골라야 할까요?

@JEEN
JEEN / diff-include-struct.h.diff
Created July 18, 2013 12:45
Unrealircd 의 CHANNELLEN 제한
--- include/struct.h.1 2013-07-18 21:42:20.752771379 +0900
+++ include/struct.h 2013-07-18 21:42:33.608803867 +0900
@@ -175,7 +175,7 @@
#define USERLEN 10
#define REALLEN 50
#define TOPICLEN 307
-#define CHANNELLEN 32
+#define CHANNELLEN 50
#define PASSWDLEN 48 /* was 20, then 32, now 48. */
#define KEYLEN 23
@JEEN
JEEN / ascendolify.pl
Last active December 19, 2015 12:19
#!/usr/bin/perl
my $file1 = $ARGV[0];
my $file2 = $ARGV[1];
open my $R, "<", $file1 or die ("Could not open $file!");
open my $P, "<", $file2 or die ("Could not open $file!");
my %data = ();
while (my $Rline = <$R>) {
$Rline =~ s/[\r\n]//g;
@JEEN
JEEN / ascendoly3.pl
Last active December 19, 2015 12:19
usage: perl ascendoly3.pl file1 file2
#!/usr/bin/perl
my $file1 = $ARGV[0];
my $file2 = $ARGV[1];
open my $R, "<", $file1 or die ("Could not open $file!");
open my $P, "<", $file2 or die ("Could not open $file!");
my %data = ();
while (my $Pline = <$P>) {
$Pline =~ s/[\r\n]//g;
@JEEN
JEEN / ElasticSearch-rocks
Created June 25, 2013 05:36
I have a problem my code using your Great module ElasticSearch. but a test w/ Devel::Cover occurs error like below. but, wo/ Devel::Cover was fine. How can I solve this problem?
$ HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,local,+ignore,root \
carton exec -Ilib -- prove -lv --timer --formatter TAP::Formatter::JUnit t/*
.....
[Tue Jun 25 14:26:33 2013] [error] [ERROR] ** ElasticSearch::Error::Request at local/lib/perl5/ElasticSearch/Transport/HTTP.pm line 67 :
SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[X2QKjOXGSHykChFtJCtGPA][2013-06-10][3]: SearchParseException[[2013-06-10][3]: query[sort:[*],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"prefix":{"sort":["publish_date:desc"],"title":"오리"}}}]]]; nested: SearchParseException[[2013-06-10][3]: query[sort:[*],from[-1],size[-1]: Parse Failure [No parser for element [title]]]; }{[X2QKjOXGSHykChFtJCtGPA][2013-06-10][2]: SearchParseException[[2013-06-10][2]: query[sort:[*],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"prefix":{"sort":["publish_date:desc"],"title":"오리"}}}]]]; nested: SearchParseException[[2013-06-10][2]: query[sort:[*],f
@JEEN
JEEN / ascendoly2.pl
Last active December 18, 2015 22:29
usage : perl ascendoly.pl file1 file2
#!/usr/bin/perl
my $file1 = $ARGV[0];
my $file2 = $ARGV[1];
open my $R, "<", $file1 or die ("Could not open $file!");
open my $P, "<", $file2 or die ("Could not open $file!");
my %data = ();
while (my $Rline = <$R>) {
$Rline =~ s/[\r\n]//g;
@JEEN
JEEN / ascendoly.pl
Created June 20, 2013 02:13
Usage: perl ascendoly.pl file
use strict;
use warnings;
open my $fh, "<", $ARGV[0] or die $!;
my $data;
while(<$fh>) {
s/[\r\n]//g;
my (undef, $id1, $id2) = split '\s+', $_;
push @{ $data->{$id2} }, $id1;
}
@JEEN
JEEN / average-color.pl
Created June 11, 2013 10:49
그림파일의 평균RGB 값 구하기
#!/usr/bin/env perl
use strict;
use warnings;
use GD;
my $img = GD::Image->new($ARGV[0]);
my ($width, $height) = $img->getBounds;
@JEEN
JEEN / test.pl
Created May 22, 2013 06:00
for @ascendox
#!/usr/bin/perl
open $file,'<',$ARGV[0];
while(<$file>){
my @line=split ' ',$_;
if ($line[1] < 0.05 && $line[2] < 0.05) {
$count++;
$total++;
print join("\t", @line), "\n";.
@JEEN
JEEN / download-percona-mysql-slides-2013.pl
Last active December 17, 2015 08:39
Percona MySQL Conference and Expo 2013 의 슬라이드를 모조리 다운로드 받는 스크립트 입니다.
#!/usr/bin/env perl
use strict;
use warnings;
use Web::Query;
use URI;
use AnyEvent::HTTP::LWP::UserAgent;
use Coro;
my $ua = AnyEvent::HTTP::LWP::UserAgent->new;
my $uri = URI->new('http://www.percona.com/live/mysql-conference-2013/slides');