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
/* assist inline URL shortening in the text area */ | |
(function(){ | |
var wait = 5000; // time to wait before deciding that the server is unreacheable | |
var _updateCount = window.updateCount; | |
var fst = $('fst'); | |
var timer, ele, command, original; | |
var remove = function(e){if(e && e.parentNode)e.parentNode.removeChild(e); e = null}; | |
var api = 'http://atsushaa.appspot.com/shorten/get'; | |
var cache = {}; |
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
// inspired by http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/plugin/html-sanitizer.js | |
// instead of doing with text, only use DOM1 and DocumentFragment | |
var dom_html_sanitize; | |
(function(html4){ | |
// usage is similar to html_sanitize method of html-sanitizer.js | |
// but takes an html document and returns a DocumentFragment | |
// @param document a document that the output DocumentFragment belongs to (must implement createDocumentFragment method) | |
// @param htmlDoc an html document to sanitize (must implement DOM1) |
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
src="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"ja\" dir=\"ltr\">\n\n<head>\n\n<title>\u662d\u548c28\u5e74\u897f\u65e5\u672c\u6c34\u5bb3 - Wikipedia</title>\n\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\n<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n\n<meta name=\"generator\" content=\"MediaWiki 1.16wmf4\" />\n\n<link rel=\"alternate\" type=\"application/x-wiki\" title=\"\u7de8\u96c6\" href=\"/w/index.php?title=%E6%98%AD%E5%92%8C28%E5%B9%B4%E8%A5%BF%E6%97%A5%E6%9C%AC%E6%B0%B4%E5%AE%B3&action=edit\" />\n\n<link rel=\"edit\" title=\"\u7de8\u96c6\" href=\"/w/index.php?title=%E6%98%AD%E5%92%8C28%E5%B9%B4%E8%A5%BF%E6%97%A5%E6%9C%AC%E6%B0%B4%E5%AE%B3&action=edit\" />\n\n<link rel=\"apple-touch-icon\" href=\"http://ja.wikipedia.org/apple-touch-icon.png\" />\n\n<link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n\n<link |
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 favstar_user; | |
(function() { | |
var initialized = false; | |
function showFavstar() { | |
switchTo('favstar'); | |
$('tw2c').innerHTML = '<iframe src="http://favstar.fm/users/'+favstar_user+'/recent" style="display:block;border:none;width:100%;height:600px;"></iframe>'; | |
return false; |
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 twicli post canceler | |
// @namespace http://efcl.info/ | |
// @description twicliのポストを行うのに5秒の猶予を設けて、その間にキャンセルボタンを押せばポストをキャンセルできます。 | |
// @author azu | |
// @homepage http://efcl.info/ | |
// @twitter https://twitter.com/azu_re | |
// ==/UserScript== | |
/* http://gist.github.com/567983.txt をプラグインにロード */ |
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
alert(window.location.href); |
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== | |
// @include http://a.hatena.ne.jp/* | |
// ==/UserScript== | |
(function() { | |
function replaceLinks() { | |
Array.prototype.forEach.call( | |
document.querySelectorAll('a[href^="http://a.st-hatena.com/go?"]'), | |
function(a) { |
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 JS_Advent_Calendar_2010 = [ | |
{ | |
"day" : 1, | |
"name" : "dreamfire", | |
"title" : "5分で分かる jQuery", | |
"link" : "http://d.hatena.ne.jp/dreamfire/20101201/javascript_advent2010" | |
}, | |
{ | |
"day" : 2, | |
"name" : "t32k", |
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
diff --git a/src/msgpack.cc b/src/msgpack.cc | |
index 0803d67..818fe5d 100644 | |
--- a/src/msgpack.cc | |
+++ b/src/msgpack.cc | |
@@ -288,8 +288,7 @@ pack(const Arguments &args) { | |
} | |
} | |
- Buffer *bp = Buffer::New(sb._sbuf.size); | |
- memcpy(bp->data(), sb._sbuf.data, sb._sbuf.size); |