Skip to content

Instantly share code, notes, and snippets.

View JEEN's full-sized avatar

Jeen Lee JEEN

View GitHub Profile
use v6;
my $file = open 'scores';
my @names = $file.get.split(' ');
my %games;
my %sets;
for $file.lines -> $line {
my ($pairing, $result) = $line.split(' | ');
my ($p1, $p2) = $pairing.split(' vs ');
From 97404223f867f857d7b4b5b98bf87ead963d5ead Mon Sep 17 00:00:00 2001
From: JEEN Lee <jeen@perl.kr>
Date: Fri, 2 Apr 2010 18:49:15 +0900
Subject: [PATCH] aa
---
etc/barcode.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/etc/barcode.js b/etc/barcode.js
From 0cbdd6dfc6f6356c02446d8975399f462a6fcad1 Mon Sep 17 00:00:00 2001
From: JEEN <jeen@haak.(none)>
Date: Mon, 5 Apr 2010 12:45:57 +0900
Subject: [PATCH] support urls
---
etc/bookmarklet.js | 4 ++--
views/index.tt | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
use strict;
use warnings;
use Getopt::Long;
use LWP::UserAgent;
use File::Path;
my $result;
my ($library, $library_c, $doc_type);
$result = GetOptions(
"js=s" => \$library,
그런 거 없다
print "그런 거 없...";
use LWP::UserAgent;
use Web::Scraper;
my $ua = LWP::UserAgent->new( agent => 'Dummy Lee Jongs' );
my $res = $ua->get('http://....');
die "WTF?" unless $res->is_success;
my $scraper = scraper {
process 'div[id="blahblah"]>table+table>tr>td>table', 'item' => scraper {
process 'tr>td>table>tr>td+td', 'title' => [ 'TEXT', sub { s/yongbinize/saillinuxize/; $_ } ];
#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';
use MyApp;
MyApp->run();
package Morris::Plugin::Pusher;
use Moose;
use namespace::autoclean;
use WWW::Pusher;
use JSON;
extends 'Morris::Plugin';
after register => sub {
my ($self, $conn) = @_;
$conn->register_hook( 'chat.privmsg', sub { $self->handle_message(@_) } );
....
<script src="http://js.pusherapp.com/1.2/pusher.min.js"></script>
<script>
WebSocket.__swfLocation = "/js/WebSocketMain.swf";
var server = new Pusher("YOUR AUTH KEY", "CHANNEL NAME");
server.bind('jeen', function (json) {
// json 받아서 이렇게 저렇게 주물럭주물럭 ...;
});
</script>
....