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
indexer = { | |
id: 'scala', | |
name: 'Scala', | |
icon: 'https://www.zdrojak.cz/wp-content/uploads/2014/07/scala-icon.png', | |
index: function (ctx) { | |
return ctx.fetchDocument('http://www.scala-lang.org/api/current/').then(function (document) { | |
Array.from(document.querySelectorAll('li.pack')).map(function (pack) { | |
ctx.pushIndex(pack.title, pack.querySelector('a.tplshow').href); | |
Array.from(pack.querySelector('.templates').querySelectorAll('li')).map(function (it) { |
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 Pod::Usage; | |
use Text::Markdown 'markdown'; | |
use HTML::TreeBuilder; | |
use List::Util 'max'; |
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
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
var sub = function (i) { | |
var a = arguments; | |
return function(cb) { | |
cb && cb.apply(null, a); | |
}; | |
}; | |
var array = [1, 2, 3]; | |
for (var i = 0, len = array.length; i < len; i++) | |
sub(array[i], i)(function(item, index) { console.log(item, index);}); |
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 Hatena::Diary: Fix edit-in-place toolbar tabindex | |
// @namespace http://lowreal.net/ | |
// @include http://d.hatena.ne.jp/*/ | |
// ==/UserScript== | |
location.href = "javascript:"+encodeURIComponent(uneval(function () { | |
Hatena.Diary.EditInPlace.Form.addEventListener('create', function (day) { | |
Array.forEach(day.element.querySelectorAll('.edit-in-place-toolbar a'), function (e) { | |
e.tabIndex = 9999; |
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
use strict; | |
use warnings; | |
use Test::More; | |
use DateTime; | |
my $dt1 = DateTime->now; | |
{ | |
t::Util::timeshift(seconds => 10); | |
my $dt2 = DateTime->now; |
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
_,,....,,_ _人人人人人人人人人人人人人人人_ | |
-''":::::::::::::`''> ゆっくりした結果がこれだよ!!! < | |
ヽ::::::::::::::::::::: ̄^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄ | |
|::::::;ノ´ ̄\:::::::::::\_,. -‐ァ __ _____ ______ | |
|::::ノ ヽ、ヽr-r'"´ (.__ ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、 | |
_,.!イ_ _,.ヘーァ'二ハ二ヽ、へ,_7 'r ´ ヽ、ン、 | |
::::::rー''7コ-‐'"´ ; ', `ヽ/`7 ,'==─- -─==', i | |
r-'ァ'"´/ /! ハ ハ ! iヾ_ノ i イ iゝ、イ人レ/_ルヽイ i | | |
!イ´ ,' | /__,.!/ V 、!__ハ ,' ,ゝ レリイi (ヒ_] ヒ_ン ).| .|、i .|| | |
`! !/レi' (ヒ_] ヒ_ン レ'i ノ !Y!"" ,___, "" 「 !ノ i | |