Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
nobodyplace / gist:863557
Created March 10, 2011 04:03
Blackbird Pie用bookmarklet 日本時間対応版
javascript:(function(){_my_script=document.createElement('SCRIPT');_my_script.type='text/javascript';_my_script.src='http://lab.nplll.com/bbp/bookmarklet.jst.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_my_script);})();
@nobodyplace
nobodyplace / nicotw.user.js
Created March 29, 2011 08:41
視聴したニコニコ動画を自動的にTwitterにPostするGreasemonkey
// ==UserScript==
// @name nicotw
// @version 0.0.2
// @namespace http://nplll.com/
// @description 視聴したニコニコ動画を自動的にTwitterにPostするGreasemonkey
// @include http://www.nicovideo.jp/watch/*
// @require https://github.com/azu/OAuth-for-Greasemonkey/raw/master/oauth.js
// @require https://github.com/azu/OAuth-for-Greasemonkey/raw/master/sha1.js
// @require https://github.com/azu/OAuth-for-Greasemonkey/raw/master/GMwrap.js
// @resource oauthbutton http://a0.twimg.com/images/dev/buttons/sign-in-with-twitter-d.png
@nobodyplace
nobodyplace / yahoojp2sankei.user.js
Created May 18, 2011 02:27
Yahoo!Japanの記事右下にある産経新聞へのリンクをイザ!からMSNに変更する
// ==UserScript==
// @name yahoojp2sankei
// @version 0.0.1
// @namespace http://nplll.com
// @description Yahoo!Japannの産経新聞へのリンクをイザ!からMSNに変更する
// @include http://headlines.yahoo.co.jp/*
// @updated 2011/05/18 11:00
// ==/UserScript==
// 0.0.1 - 2011/05/18 リリース
@nobodyplace
nobodyplace / microad_autocomplete_enable.user.js
Created May 29, 2011 08:28
MicroAdでパスワード保存を有効にする
// ==UserScript==
// @name MicroAd Password Enable
// @namespace http://nplll.com
// @include http://www.microad.jp/*
// ==/UserScript==
(function(){
document.getElementById('newlogin').autocomplete = 'on';
})();
$sth = $pdo->prepare("INSERT INTO sample (id, date) VALUES (:id, :date)");
foreach($data as $line):
$sth->execute(array(
':id' => $line['id'],
':date' => $line['date']
));
endforeach;
$sth->closeCursor();
try {
$pdo->beginTransaction();
foreach($data as $index => $line):
$sth = $pdo->prepare("INSERT INTO sample (id, date) VALUES (:id, :date)");
$sth->execute(array(
':id' => $line['id'],
':date' => $line['date']
));
$sth->closeCursor();
endforeach;
$sql_values = array();
foreach($data as $line):
$sql_values[] = "(" . $line['id'] . ", '" . $line['date'] . "')";
endforeach;
$sql = "INSERT INTO sample (id, date) VALUES " . implode(', ', $sql_values);
$pdo->query($sql);
@nobodyplace
nobodyplace / nicovideo_1nico
Created July 12, 2011 13:24
ニコニコ動画の動画ページから1ニコの動画ページを開くbookmarklet
javascript:(function(){window.open('http://1ni.co/watch/'+location.href.match(/^http:\/\/www.nicovideo.jp\/watch\/(\w+)\??/)[1]);})();
@nobodyplace
nobodyplace / nico_canonical.user.js
Created October 2, 2011 03:58
ニコニコ動画のcanonicalを置き換えるGreasemonkey
// ==UserScript==
// @name Nico Canonical
// @version 0.0.1
// @namespace https://gist.github.com/1257023
// @description ニコニコ動画のcanonicalを置き換えるGreasemonkey
// @include http://www.nicovideo.jp/watch/*
// @updated 2011/10/02 12:56:00
// ==/UserScript==
// 0.0.1 - 2011/10/02 リリース
@nobodyplace
nobodyplace / extractor.Flickr.restoreStatic.js
Created November 24, 2011 08:15
[tombloo] Flickrの静的ファイルドメインが変わったことに対するパッチ
Tombloo.Service.extractors['Photo - Flickr'].RE = new RegExp('^http://(?:.+?.)?static.?flickr.com/\\d+?/(\\d+?)_.*');