Skip to content

Instantly share code, notes, and snippets.

@sng2c
sng2c / Test-Continuous-Quick-Guid-KO.md
Last active December 31, 2015 14:29
Test::Continuous Quick Guide
@sng2c
sng2c / config.yaml
Created December 17, 2013 06:09
DBIC dump schema script.
---
database:
dsn: DBI:mysql:database=DBNAME;host=DBHOST
userid: DBUSER
passwd: DBPASS
options:
mysql_enable_utf8: 1
mysql_auto_reconnect: 1
@sng2c
sng2c / gen_thumb.pl
Last active December 28, 2015 04:49
#!/usr/bin/env perl
use 5.010;
my $path = '.';
my @types=qw( mov mp4 avi mkv m4v xvid divx wmv mpg mpeg );
my @files = `find $path`;
chomp(@files);
@sng2c
sng2c / monosami.pl
Created November 9, 2013 19:57
make multi-language smi subtitle file to mono-language
#!/usr/bin/env perl
use 5.018;
#use Encode qw(from_to);
my $smi_path = $ARGV[0];
my $want = lc $ARGV[1];
my $smi;
{
local $/;
undef $/;
open(my $smifh,'<', $smi_path);
import scala.swing._
import scala.swing.event._
object ButtonApp extends SimpleSwingApplication {
def top = new MainFrame {
title = "My Frame"
contents = new GridPanel(2, 2) {
hGap = 3
vGap = 3
contents += new Button {
@sng2c
sng2c / proxy.pl
Last active December 27, 2015 15:28
perl proxy server
#!/usr/bin/env perl
use HTTP::Proxy;
my $proxy = HTTP::Proxy->new(
host => '',
port => 8080,
maxchild=>10,
);
$proxy->start;
@sng2c
sng2c / regpat.pl
Last active December 27, 2015 01:29
컴파일된 정규표현식의 원래 입력패턴을 알아내는 법
#!/usr/bin/env perl
use re 'regexp_pattern';
my $reg = qr/(?i)abc/s;
my ($pat,$flag) = regexp_pattern $reg;
print "pat :$pat\n"
print "flag:$flag\n";
# pat :(?i)abc
# flag:is
@sng2c
sng2c / KorMailSend.pm
Created September 6, 2013 02:04
한글로 메일 보내기
package KorMailSend;
use strict;
use warnings;
use MIME::Lite;
use MIME::Base64;
use Encode qw(encode);
sub sendmail{
my ($from,$to,$subj,$cont) = @_;
my $subj2 = '=?UTF8?B?' . encode_base64($subj) .'?=';
@sng2c
sng2c / start.sh
Last active December 20, 2015 17:48
Create 'autostart' directory on a directory which startall.pl is on. Each app directory must have start.sh and put or link the app directory in autostart directory. If you launch startall.pl, all of the start.sh scripts are running within each 'screen' processes.
#!/bin/sh
# An example of start.sh
./app_pkg.pl daemon -l 'http://localhost:50005'
@sng2c
sng2c / README_VROOM_CUR.markdown
Last active December 20, 2015 16:29
vroom_cur.pl

VRoom current page viewer

You can see current editing slide page on VRoom with typing 'SS' in VIM. To activate this function, move 'vroom_cur.pl' to your path. And append below one line to .vimrc file.

map SS :w|:execute "!vroom_cur.pl '".bufname("%")."' ".line(".")