Skip to content

Instantly share code, notes, and snippets.

View shelling's full-sized avatar

shelling shelling

View GitHub Profile
#!/usr/bin/env perl
use Modern::Perl;
use Data::Dumper;
use EV;
use AnyEvent;
use AnyEvent::HTTP;
sub shot {
my ($id) = @_;
class Foo
# has_many :bar
attr_accessor :bar
def method_missing(method, *args, &block)
if method.to_s =~ /(\w+)_on/
raise Exception, "no condition given to filter `#{$1}'" unless args[0]
result = self.send($1.to_sym)
args[0].each { |field, value|
result = result.select { |item|
{
"基隆市": [
"七堵區",
"中山區",
"中正區",
"仁愛區",
"安樂區",
"信義區",
"暖暖區",
質詢事項
甲、行政院答復部分
(一)行政院函送李委員應元就政府進口含瘦肉精美牛等施政問題所提質詢之書面答復,請查照案。
(行政院函 中華民國101年10月9日院臺專字第1010061063號)
(立法院函 編號:8-2-1-323)
#!/usr/bin/env perl
#
use Modern::Perl;
package main;
my @main::debug;
push @main::debug, "log message";
@shelling
shelling / hidden-file-input.html.haml
Created October 30, 2012 14:59
hidden file input
---
layout: false
---
!!! 5
%html
%head
%link{href: "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.0/css/bootstrap-combined.min.css", rel: "stylesheet"}
%body
.container
abl-mode 0.9.0 installed Python TDD minor mode
alpha 1.0 installed increase frame transparency
applescript-mode 1.1 installed major mode for editing AppleScript source
birds-of-paradi... 20120811.... installed A brown/orange light-on-dark theme for Emacs 24 (deftheme). [source: github]
coffee-mode 20121004.... installed Major mode to edit CoffeeScript files in Emacs [source: github]
color-theme 20080305.834 installed install color themes [source: bzr]
color-theme-rai... 0.0.2 installed Railscasts color theme for GNU Emacs.
color-theme-san... 20121001.936 installed A version of Ethan Schoonover's Solarized themes [source: github]
cperl-mode 20110624.... installed Perl code editing commands for Emacs [source: github]
erlang 20120831.... installed No description available. [source: github]
#!/bin/bash
# Install script for the Darwin Streaming Server
# source release
echo;echo Installing Darwin Streaming Server;echo
INSTALL_OS=`uname`
$ua->request(
HTTP::Request->new(GET => $URL),
sub {
my($chunk, $res) = @_;
# do something on $chunk
}
);
#!/usr/bin/env perl
use Modern::Perl;
use Plack;
use MogileFS::Client;
my $client = MogileFS::Client->new( domain => "test", hosts => ["localhost:7001"] );
use HTTP::Request;