perl code๋ฅผ ์คํํ ์ ์๋ค๋ฉด ์์ค์ฝ๋๋ฅผ ๋ณผ ์๋ ์์ต๋๋ค. ํ์ง๋ง ๋ช ์ค ์๋๋ ์ฝ๋๋ก ์์ ์ ์ฝ๋๋ฅผ ์จ๊ธธ ์๋ ์์ต๋๋ค.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>what the hell</title> | |
<style> | |
#foo { color: red } | |
#bar { color: green } | |
#baz { color: blue } | |
#bar:before,#baz:before { |
This file contains hidden or 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
.* | |
*~ | |
!.gitignore | |
!.perltidyrc | |
blib | |
pm_to_blib | |
Makefile* | |
!Makefile.PL | |
MANIFEST* | |
!MANIFEST.SKIP |
This file contains hidden or 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
require [ | |
"jquery", | |
"routers/root" | |
], ($, Router) -> | |
$(document).ready -> | |
new Router | |
Backbone.history.start() |
This file contains hidden or 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
#----------------------------------------------- | |
# by @jeen | |
#----------------------------------------------- | |
sub get_activities { | |
my ($self, $args) = @_; | |
my ( $cond, $attr ) = $self->_get_activities_condition($args); | |
my $r = $self->resultset('Activity')->search($cond, $attr); | |
my $pager = $self->pageset($r->pager); | |
my @list; |
This file contains hidden or 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
use 5.010; | |
use List::Util 'reduce'; | |
my @numbers = qw/1 2 3/; | |
my $sum1 = reduce { $a + $b } (0, @numbers); | |
my $sum2 = reduce { $a + $b } (10, @numbers); | |
say $sum1; | |
say $sum2; | |
__DATA__ | |
6 |
This file contains hidden or 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
;; joining && autojoing | |
;; make sure to use wildcards for e.g. freenode as the actual server | |
;; name can be be a bit different, which would screw up autoconnect | |
(erc-autojoin-mode t) | |
(setq erc-autojoin-channels-alist | |
'((".*\\.freenode.net" "#perl-kr" "#ream-dev") | |
(".*\\.silex.kr" "#silex"))) | |
(defun djcb-erc-start-or-switch () |
This file contains hidden or 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; | |
my @arr = qw/a b c d f s f d c c s f e s v c x x z d f e s f d f/; | |
my %cont; | |
for my $item (@arr) { | |
$cont{$item}++; | |
} |
This file contains hidden or 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 Pod::Usage; | |
use Getopt::Long; | |
use File::Slurp 'slurp'; | |
my %options; | |
GetOptions(\%options, "--show", "--help"); |
This file contains hidden or 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
;; visible bell | |
(setq visible-bell nil) | |
;; allow selection deletion | |
(delete-selection-mode t) | |
;; make sure delete key is delete key | |
(global-set-key [delete] 'delete-char) | |
;; have emacs scroll line-by-line | |
(setq scroll-step 1) | |
;; set color-theme | |
(color-theme-zenburn) |