This file contains 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
sub split_string { | |
my ($str, $length) = @_; | |
my $chars = decode( $HttpCharset, $str ); | |
my $first = substr( $chars, 0, $length ); | |
my $last = substr( $chars, $length ); | |
return ( encode( $HttpCharset, $first ), encode( $HttpCharset, $last ) ); | |
} |
This file contains 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
export PERLBREW_BASHRC_VERSION=0.41 | |
[[ -z "$PERLBREW_ROOT" ]] && export PERLBREW_ROOT="$HOME/perl5/perlbrew" | |
[[ -z "$PERLBREW_HOME" ]] && export PERLBREW_HOME="$HOME/.perlbrew" | |
if [[ ! -n "$PERLBREW_SKIP_INIT" ]]; then | |
if [[ -f "$PERLBREW_HOME/init" ]]; then | |
. "$PERLBREW_HOME/init" | |
fi | |
fi |
This file contains 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 | |
# git diff 의 출력을 받아서 인코딩을 변환하여 출력 | |
# 예: git diff --color | cat_encode.pl | |
use strict; | |
use warnings; | |
use Encode; | |
use Encode::Guess; | |
my $pat_color = qr/(?:\e\[[;\d]*?m)/; |
This file contains 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
<html> | |
<head> | |
<title>MP3 Deduper</title> | |
<style type="text/css"> | |
.btnRemove { | |
color: white; | |
font-size: 9pt; | |
background-color: #f66; | |
border: solid 1px red; | |
margin-left: 5px; |
This file contains 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 5.010; | |
use utf8; | |
use strict; | |
use warnings; | |
use autodie; | |
use File::Find; | |
use MP3::Info; | |
use Digest::MD5 qw/ md5_hex /; |
This file contains 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 Benchmark qw/:all/; | |
# 입력 (A,(B,(D,(d,_,_),_),(E,_,_)),(C,(F,_,(f,_,_)),(G,(g,_,_),_))) | |
# 위 입력을 받아 A를 root로 하는 트리 구조를 구성 | |
# | |
# G | |
# g |
This file contains 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
#include <stdio.h> | |
#define debug_printf(x) printf("[%d, %s] %s", __LINE__, __FUNCTION__, (x)) | |
int main() { | |
debug_printf("hello\n"); | |
} |
This file contains 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
--- Directory.pm.org 2012-11-12 13:38:22.000000000 +0900 | |
+++ Directory.pm 2013-03-31 00:23:52.000000000 +0900 | |
@@ -5,6 +5,7 @@ | |
use Cwd (); | |
use Encode (); | |
+use Encode::Locale; | |
use DirHandle; | |
use Mojo::Base qw{ Mojolicious::Plugin }; | |
use Mojolicious::Types; |
This file contains 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
" Vim syntax file (for including only) | |
" html w/ Perl as a preprocessor in __DATA__ | |
" Language: Mojo epl templates stored in Perl __DATA__ | |
" Maintainer: yko <[email protected]> | |
" Version: 0.04 | |
" Last Change: 2011 Aug 09 | |
" Location: http://github.com/yko/mojo.vim | |
" | |
" Thanks to Viacheslav Tykhanovskyi for simplified region syntax |
This file contains 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
#!/opt/perl | |
use Mojolicious::Lite; | |
use JSON; | |
get '/' => sub { | |
my $self = shift; | |
$self->render("index"); | |
}; |
OlderNewer