Skip to content

Instantly share code, notes, and snippets.

aero aero

  • Seoul, Republic of Korea
Block or report user

Report or block aero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aero
aero / group5.pl
Created Dec 11, 2016
5개씩 묶기
View group5.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my @m = 1..17;
my @m5;
my $step = 5;
@aero
aero / autoinstall2.pl
Last active Nov 20, 2016
Automatically install all dependence modules through cpanminus within core Perl distribution.
View autoinstall2.pl
#!/usr/bin/env perl
BEGIN {
require FindBin;
require lib;
my $locallib_path = "$FindBin::RealBin/locallib/$^V";
lib->import("$locallib_path/lib/perl5");
my $cpanm;
@aero
aero / autoinstall.pl
Last active Nov 20, 2016
Automatically install all dependence modules through cpanminus within core Perl distribution.
View autoinstall.pl
#!/usr/bin/env perl
BEGIN {
my @REQ_MODULES = qw/
Mojolicious
Text::CSV_XS
/;
require FindBin;
require lib;
@aero
aero / parse.pl
Created Jan 21, 2016
text section parsing
View parse.pl
#!/usr/bin/env perl
use strict;
use warnings;
my $s = do { local $/; <DATA> };
my %section = $s =~ m/
^{{{(.*?)}}}-+$
\n(.*?)
(?=\n{{{.*?}}}-+$|\Z)
@aero
aero / mojo_mysql_reconnect.pl
Last active Dec 23, 2015
Solving Mojolicious fork-based multi-processes daemon(eg. hypnotoad) Mojo::mysql connection timeout close issue.
View mojo_mysql_reconnect.pl
use Mojolicious::Lite;
use Mojo::mysql;
helper db => sub {
state $db = Mojo::mysql->new('mysql://user:pass@/task')->db;
if (! $db->ping ) {
$db->dbh( $db->dbh->clone() ) or die "cannot connect to db";
}
return $db;
};
@aero
aero / gist:0099cf0db451027af9f1
Last active Aug 29, 2015
compile Alien::wxWidgets 0.67 on MacOSX yosemite
View gist:0099cf0db451027af9f1
perl Build.PL --wxWidgets-extraflags="CFLAGS='-I/usr/local/Cellar/xz/5.2.1/include -I/usr/local/Cellar/jpeg/8d/include' CPPFLAGS='-I/usr/local/Cellar/xz/5.2.1/include -I/usr/local/Cellar/jpeg/8d/include' CXXFLAGS='-I/usr/local/Cellar/xz/5.2.1/include -I/usr/local/Cellar/jpeg/8d/include' LDFLAGS='-L/usr/local/Cellar/xz/5.2.1/lib -L/usr/local/Cellar/jpeg/8d/lib'"
https://github.com/wxWidgets/wxWidgets/pull/40
https://github.com/eranif/codelite/issues/825
https://github.com/wxWidgets/wxWidgets/commit/ad21cc332ac906b9ae8f238ab135cbe410e78eba
http://goharsha.com/blog/compiling-wxwidgets-3-0-2-mac-os-x-yosemite/ 도 참고
View gist:5cbb4823180bf1bb9438
# Rexfile
use Expect;
set connection => "OpenSSH";
my $expect_timeout = 5;
my $git_password = 'f00b4r';
my $sudo_password = 'test';
@aero
aero / json_ordered.pl
Last active Aug 29, 2015 — forked from olegwtf/json_ordered.pl
json을 읽어 원래 json 필드 순서 유지
View json_ordered.pl
use strict;
use Tie::IxHash;
use JSON::PP;
# magic start
my $obj_parser_sub = \&JSON::PP::object;
*JSON::PP::object = sub {
tie my %obj, 'Tie::IxHash';
$obj_parser_sub->(\%obj);
@aero
aero / readline_ev.cpp
Created Mar 12, 2015
Example: Integrating readline with libev eventloop.
View readline_ev.cpp
// g++ -o readline_ev -g readline_ev.cpp -g -lreadline -lev
//
#include <stdlib.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <ev.h>
#include <fcntl.h>
@aero
aero / bench.pl
Created Jul 22, 2013
p5-mop-redux benchmark
View bench.pl
#!/usr/bin/env perl
use 5.012;
use warnings;
use blib;
use Benchmark qw/cmpthese/;
use mop; # 2013-07-22
{
package Raw;
You can’t perform that action at this time.