Skip to content

Instantly share code, notes, and snippets.

@sng2c
sng2c / makedic.pl
Created April 19, 2013 14:49
사전코딩. 참고 : http://altools.tistory.com/60
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.010;
use YAML;
=pod
@sng2c
sng2c / gist:5468028
Created April 26, 2013 15:15
워드프레스에 소스넣기
[sourcecode language="perl"]
use 5.010;
say "hello";
[/sourcecode]
@sng2c
sng2c / using_PAR.mkd
Last active December 16, 2015 17:09
원격으로 PAR을 실행하는 세가지 방법

원격으로 PAR을 실행하는 세가지 방법

# Test1.pm
package Test1;
hello{
    print "HELLO\n";
}

1. PAR Repository 이용.

@sng2c
sng2c / build_crypto.sh
Last active December 16, 2015 17:09
PAR 암호화
# -T 는 임시디렉토리 명시
# -B 는 Core 모듈도 포함
pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -B -T partmp -o test1 test.pl
pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -B -o test1 test.pl

Perl 어플리케이션 배포하기

Abstraction

perl 어플리케이션을 개발하여 각 서버로 배포할 때, 모듈의존성을 해결하는 방법에 대해서 설명합니다.

CPAN

perl 스크립트를 작성할 때 CPAN (https://metacpan.org) 을 이용하면 방대한 양의 모듈, 상세한 문서, 다른 모듈을 기반으로 하여 높은 완성도를 이끌어 내는 perl만의 독특한 공유 문화 덕분에 손쉽게 복잡한 기능을 완벽하게 구현할 수 있습니다.

source

#!/usr/bin/env perl 
use 5.010;
use utf8;
use Data::Dumper;
use Data::Dump;
use YAML;
use JSON;
use Data::Printer;
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use JSON;
use LWP::UserAgent;
my $m = LWP::UserAgent->new;
binmode(STDOUT,':utf8');
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Net::MyPeople::Bot;
use Data::Printer;
my $APIKEY = $ENV{MYPEOPLE_APIKEY};
@sng2c
sng2c / AREADME.md
Last active December 19, 2015 00:09
AutoHotKey와 Perl을 이용하여, VM에 띄워진 Window가 깜빡일 때 반응하여, Host Linux의 Notify로 띄워주는 스크립트들. Notify on a host os with blinking taskbar's title from a guest os on VM by AHK and Perl scripts.

Host 리눅스 쪽

  1. host인 리눅스 쪽에서는 perl모듈인 Mojolicious가 필요하고, notify-send 명령이 사용가능해야 한다.
  2. perl notify_recv.pl daemon 으로 웹서버를 띄운다. 포트값은 기본으로 3000번

VM내 윈도우 쪽

  1. VM안의 Windows는 Strawberry perl과 AutoHotKey를 설치한다.
  2. AlertFlash.ahk 와 send2linux.pl 을 함께 둔다.
  3. send2linux.pl 내의 IP값을 ipconfig명령의 결과에 보이는 Gateway 로 잡고 포트도 맞춰준다.
  4. AlertFlash.ahk를 실행한다.
  • 올드보이 OST - The Last Waltz
  • 올드보이 OST - The Searchers
  • 올드보이 OST - Cries Of whispers
  • Damien Rice - Blower's Daughter
  • 다이나믹듀오 - 불면증
  • 다이나믹듀오 - 죽일놈
  • 브라운아이드 소울 - 2003.7.14 AM 2:43
  • 브라운아이드 소울 - 바보