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
sub add {} | |
sub post_add { | |
my ($class,$c) = @_; | |
container('dbh')->insert({ | |
name => $c->req->param('name'), | |
created_at => container('dtf')->now->strftime("%Y-%m-%d %H:%M:S") | |
}, table => 'member'); | |
$c->redirect('/member/'); |
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
[X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X][X] | |
[X][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][X] | |
[X][ ][X][X][X][ ][X][ ][X][X][X][X][X][ ][X][X][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][X][X][ ][X][X][X][X] | |
[X][ ][X][ ][ ][ ][X][ ][X][ ][ ][ ][X][ ][X][ ][ ][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][ ][ ][X][X] | |
[X][ ][X][ ][X][X][X][X][X][ ][X][X][X][ ][X][ ][X][ ][X][X][X][X][X][ ][X][ ][X][ ][X][X][X][ ][X][X][X][X] | |
[X][ ][X][ ][X][ ][X][ ][ ][ ][X][ ][X][ ][X][ ][X][ ][X][ ][ ][ ][ ][ ][X][ ][X][ ][ ][ ][ ][ ][ ][ ][X][X] | |
[X][ ][X][ ][X][X][X][X][X][ ][X][ ][X][ ][X][X][X][ ][X][X][X][X][X][ ][X][X][X][ ][X][ ][X][ ][X][ ][X][X] | |
[X][ ][X][ ][X][ ][ ][ ][ ][ ][X][ ][X][ ][X][ ][ ][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][X][ ][ ][X] | |
[X][ ][X][X][X][ ][X][ ][X][X][X][ ][X][ ][X][ ][X][ ][X][ ][X][X][X][ ][X][ ][X][X][X][X][X][ ][X][X][X][X] | |
[X][ ][ ][ ][ ][ ][X][ ][ ][ ][ ][ ][ ][ ][ |
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 strict; | |
use warnings; | |
use Data::Dumper; | |
my $app = sub { | |
my $env = shift; | |
my $dump = '<html><body><h1>dump env</h1><table style="font-size:normal;">'; | |
$dump .= | |
join("\n", |
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 strict; | |
use warnings; | |
use Plack::Request; | |
use Imager::QRCode; | |
my $html = q{ | |
<html> | |
<head> | |
<title>qrcode</title> | |
</head> |
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
#!/bin/sh | |
log_file=`date --date '7 day ago' +"/path/to/%Y%m%d.log"` | |
if[ -e $log_file ]; then | |
rm -f $log_file | |
fi |
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
package main | |
import ( 08 "os"; 09 "flag"; // command line option parser 10 ) | |
var omitNewline = flag.Bool("n", false, "don't print final newline") | |
const ( 15 Space = " "; 16 Newline = "\n"; 17 ) | |
func main() { | |
flag.Parse(); |
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
1 package main | |
2 | |
3 import "fmt" | |
4 | |
5 func main () { | |
6 fmt.Printf("Hello World\n") | |
7 } |
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 strict; | |
use warnings; | |
my %hash; | |
@hash { qw/aaaa bbbb/ } = (0..1); |
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 strict; | |
use warnings; | |
use LWP::UserAgent; | |
use HTTP::Request::Common 'POST'; | |
my @file_paths = @ARGV; | |
my $user_id = q{}; | |
my $passwd = q{}; |
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
class Object | |
def send_through(object, *args) | |
object.dispatcher_for(self).call(self, *args) | |
end | |
end | |
module Dispatcher | |
class DispatcherNotFound < StandardError; end | |
def self.extended(klass) |