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 Haiku notify auto opener | |
// @namespace http://www.hatena.ne.jp/Nikola/ | |
// @description はてなハイク1.1の新着通知を自動で開きます。Google Chromeにも対応。 | |
// @include http://h1beta.hatena.ne.jp/* | |
// @include http://h1beta.hatena.com/* | |
// ==/UserScript== | |
(function () { |
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 replace star by profile icon | |
// @namespace http://www.hatena.ne.jp/Nikola/ | |
// @description replace star by profile icon (for Google Chrome8) | |
// @include http://*.hatena.ne.jp/* | |
// @version 1.0.0 | |
// ==/UserScript== | |
(function () { | |
var executeBrowserContext = function(funcOrString) { |
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 |
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
<?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
// 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
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
// ==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
// 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
// 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 | |
} |
OlderNewer