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
>set foo 0 10 3 // 10秒間有効な長さ3文字のfooをストア | |
>123 // 値は123 | |
STORED | |
>get foo // 有効期限内 | |
VALUE foo 0 3 | |
123 | |
END | |
>get foo // 有効期限を過ぎた | |
END | |
>set foo 0 3.5 3 // 3.5秒いける? |
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
// ==UserScript== | |
// @name KanColleLeavePreventer | |
// @namespace http://astj.hatenablog.com/ | |
// @include http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/ | |
// ==/UserScript== | |
window.addEventListener('beforeunload', function (e) { | |
return '艦これ閉じようとしてるよ?'; | |
}, false); |
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
$ echo '(1,2,3)(2,2,3)(3,2,3)' | perl -pale '$_ =~ s/\((.+?),(.+?),(.+?)\)/\($3,$1,$2\)/g;' | |
(3,1,2)(3,2,2)(3,3,2) |
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 Valiemon; | |
use Data::Dumper; | |
use JSON::XS qw(decode_json); | |
my $content = do { | |
local $/; |
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
$ carton exec -- prove -lvr t/Plack-Middleware/access_log_timed.t | |
t/Plack-Middleware/access_log_timed.t .. | |
ok 1 | |
ok 2 | |
ok 3 | |
ok 4 | |
ok 5 | |
ok 6 | |
ok 7 | |
ok 8 |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println("Hello!") | |
} |
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
[astj@jumpin01 /Users/astj/workspace/zef-test]$ cat Dockerfile | |
FROM rakudo-star:latest | |
RUN zef install Smack | |
[astj@jumpin01 /Users/astj/workspace/zef-test]$ docker build . | |
Sending build context to Docker daemon 2.048kB | |
Step 1/2 : FROM rakudo-star:latest | |
---> 91fe3ad6db91 | |
Step 2/2 : RUN zef install Smack | |
---> Running in f9cae0e47e6f | |
===> Searching for: Smack |