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 no script pixiv viewer | |
// @namespace http://www.hatena.ne.jp/Nikola/ | |
// @description view pixiv search result with no script | |
// @version 1.0.1 | |
// @include http://www.pixiv.net/* | |
// ==/UserScript== | |
(function(){ | |
var target = document.querySelectorAll('.ui-scroll-view[data-src]'); | |
if (!target) |
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
// http://d.hatena.ne.jp/fumokmm/20110822/1314013182 | |
// ローマ数字定義 | |
def romans = [ | |
I :1 , | |
IV:4 , V:5 , IX:9 , X:10 , | |
XL:40 , L:50 , XC:90 , C:100 , | |
CD:400, D:500, CM:900, M:1000 | |
] | |
// シンボル化能力を追加 |
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
// http://d.hatena.ne.jp/fumokmm/20110812/1313138407 | |
def dropStartsSame(String... args) { | |
if (args.any{!it}) return args | |
args*.substring( | |
args*.toList().transpose().with{ | |
def i=0; it.collect{[i++, it]} | |
}.with{ dup -> | |
dup.find{ it[1].unique().size() != 1 }.with { | |
it ? it[0] : dup.last()[0]+1 | |
} |
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
// http://d.hatena.ne.jp/fumokmm/20110815/1313405510 | |
def fizzBuzzN(nums, list) { | |
def toMap = { lst -> (0..<lst.size()/2).collectEntries{ lst[it*2..it*2+1] } } | |
toMap(list).collect{ k, v -> | |
v = nums.collect{ it % k == 0 ? v : '' } | |
}.transpose()*.join().eachWithIndex{ it, idx -> | |
println(it ? it : idx+nums.from) | |
} | |
} | |
fizzBuzzN(1..100, [3, 'Fizz', 5, 'Buzz', 7, 'Hoge']) |
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 cafetter brunch | |
// @namespace http://www.hatena.ne.jp/Nikola/ | |
// @description add class for cafetter timeline, enable tweet with no script | |
// @version 1.0.4 | |
// @include http://cafetter.com/* | |
// ==/UserScript== | |
(function(d) { | |
function setClassToTweets(d) { | |
var targets = d.querySelectorAll('.timeline li'); |
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
USAGE1 | |
{ | |
void PLUGIN('SAKNIFE\SAKNIFE.DLL', 'OnSwissArmyKnifeExecute', 'empty_recycle_bin') | |
} | |
USAGE2 | |
{ | |
PLUGIN('BeerShower\yaya.dll', 'OnMenuExec') | |
// valueex[0]: OnBeerShower | |
} |
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://gist.github.com/nikolat/1007538 | |
// yaya.dll設定 | |
#globaldefine AYAINFO_VERSION 0 | |
#globaldefine AYAINFO_CHARSET 1 | |
#globaldefine AYAINFO_PATH 2 | |
#define PROTOCOL_VERSION "1.0" /* SAORIプロトコルバージョン */ | |
#define PROTOCOL_SENDER "AYASAORI" /* Sender */ | |
#define CRLF CHR(0xd)+CHR(0xa) /* 改行コード */ |
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
<?php | |
if (!isset($_GET['image_url'])) { | |
header('HTTP/1.0 400 Bad Request'); | |
header('Content-type: text/plain; charset=utf-8'); | |
exit('Set "image_url" parameter with PNG image URL.'); | |
} | |
$fileurl = $_GET['image_url']; | |
$image = @imagecreatefrompng($fileurl); | |
if (!$image) { | |
header('HTTP/1.0 500 Internal Server Error'); |
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
def array = [] | |
def tmp = "" | |
array = ('0'..'9') + ('a'..'z') + ('A'..'Z') + '_' | |
(1..16).each { | |
tmp += array[Math.floor(Math.random() * array.size()) as int] | |
} | |
println tmp |
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
aaa |