Skip to content

Instantly share code, notes, and snippets.

Avatar

Satoh, Hiroh cho45

View GitHub Profile
View scala.js
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) {
View markdown2inao.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
View gist:662194
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);});
View hatena-diary-edit-in-place-no-toolbar.user.js
// ==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;
View gist:354406
use strict;
use warnings;
use Test::More;
use DateTime;
my $dt1 = DateTime->now;
{
t::Util::timeshift(seconds => 10);
my $dt2 = DateTime->now;
@cho45
cho45 / yukkuri.txt
Created Jul 24, 2008 — forked from motemen/yukkuri.txt
ゆっくりしていってね!!!
View yukkuri.txt
   _,,....,,_  _人人人人人人人人人人人人人人人_
-''":::::::::::::`''>  ゆっくりした結果がこれだよ!!! <
ヽ::::::::::::::::::::: ̄^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 |
You can’t perform that action at this time.