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 Plack::Middleware::ENV; | |
use strict; | |
use warnings; | |
use parent qw(Plack::Middleware); | |
sub call { | |
my ($self, $env) = @_; | |
my @fields = grep { m/^(?:HTTP.*|REMOTE_ADDR)$/ } keys %$env; | |
local @ENV{@fields} = @$env{@fields}; | |
return $self->app->($env); |
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
Out of WRAPPER | |
[%- WRAPPER 'wrapper.tt' WITH arg1 = var, arg2 = 'literal' -%] | |
arg2: [% arg2 %] | |
[%- END -%] |
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
https://people.mozilla.org/~jorendorff/es6-draft.html を参照する。 | |
4.3.25 | |
Symbol value が ES 6 で登場。 | |
5.1.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 bit.ly referred | |
// @namespace http://nanto.asablo.jp/blog/ | |
// @include http://* | |
// @require http://svn.coderepos.org/share/lang/javascript/jsdeferred/trunk/jsdeferred.userscript.js | |
// ==/UserScript== | |
D = D(); | |
const XHTML_NS = 'http://www.w3.org/1999/xhtml'; |
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
/* | |
* HTMLParser for Greasemonkey by snaka(http://d.hatena.ne.jp/snaka72/) | |
* | |
* Original coode written by swdyh(http://d.hatena.ne.jp/swdyh/) | |
* This code includes part of AutoPagerize(http://userscripts.org/scripts/show/8551) | |
* | |
* Released under the GPL license | |
* http://www.gnu.org/copyleft/gpl.html | |
*/ |
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 Read Selection | |
// @namespace http://nanto.asablo.jp/blog/ | |
// @description Read selection text. | |
// @include chrome://browser/content/browser.xul | |
// @author nanto_vi | |
// ==/UserScript== | |
({ | |
// http://www.a-quest.com/products/aquestalk2.html |
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/perl | |
$i=1; | |
start: | |
goto print_fizz if $i % 3 == 0; | |
goto print_buzz if $i % 5 == 0; | |
print $i; | |
goto print_newline; | |
print_fizz: print 'Fizz'; | |
goto print_buzz if $i % 5 == 0; | |
goto print_newline; |
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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Mojolicious::Lite; | |
use OAuth::Lite::Consumer; | |
use XML::Atom::Feed; | |
use XML::Atom::Entry; | |
use URI::Escape qw/uri_escape_utf8/; |
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
// Router: a router that can be combined with jquery.pjax.js [1] | |
// | |
// [1] https://github.com/defunkt/jquery-pjax | |
// | |
// This file is in the public domain. | |
// | |
// | |
// var router = new Router(); | |
// $(document).on('pjax:end', function () { router.dispatch(location); }); | |
// $(function () { router.dispatch(location); }); |
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
var window = this; | |
if (typeof JSON === 'undefined') { | |
this.JSON = {}; | |
} | |
load('src/core.js'); | |
load('src/callbacks.js'); | |
load('src/deferred.js'); | |
function module() {} |
OlderNewer