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
// applicationCacheの更新を妨害する | |
Object.defineProperty(this,'applicationCache',{get:function(){return{}}}); | |
(function () { | |
// AppCache上でlocation.hrefを読み込むとAppCacheの内容を読み込むため、「ブラウザは別URLと認識するが、サーバは同じコンテンツを返すURL」を作る | |
contentLoad(location.href+'/'); | |
// 本来であればsubmit等のイベントもキャッチする必要がある | |
window.addEventListener('click', function (evn) { | |
var elem = evn.target; | |
while (elem.tagName.toLocaleLowerCase() != 'a') elem = elem.parentNode; |
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 SSE = require('sse') | |
, http = require('http'); | |
var server = http.createServer(function(req, res) { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.write('<html><head><title></title></head><body>'); | |
res.write('<script src="https://raw.githubusercontent.com/Yaffle/EventSource/master/eventsource.js"></script><script>'); | |
res.write('var es = new EventSource("/sse");es.onmessage = function (event) {alert(event.data);};'); | |
res.write('</script></body></html>'); | |
res.end(); |
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
<autogen> | |
__KeyToKey__ | |
KeyCode::P, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L, KeyCode::JIS_EISUU, KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::P, KeyCode::P, KeyCode::L, KeyCode::I, KeyCode::C, KeyCode::A, KeyCode::T, KeyCode::I, KeyCode::O, KeyCode::N, KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::A, KeyCode::C, KeyCode::H, KeyCode::E, KeyCode::SPACE, KeyCode::P, ModifierFlag::SHIFT_L, KeyCode::O, KeyCode::I, KeyCode::S, KeyCode::O, KeyCode::N, KeyCode::I, KeyCode::N, KeyCode::G | |
</autogen> |
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 shigotoshiro | |
// @namespace hinatami.net | |
// @description 平日の昼間にamazonを見れなくします。 | |
// @match http://www.amazon.co.jp/* | |
// @grant none | |
// ==/UserScript== | |
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ | |
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge |
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 dispatcher = function (path, func) { | |
if (func) return dispatcher.path_func.push([path, func]); | |
$.each(dispatcher.path_func, function () { | |
if (path.match(this[0])) return this[1](); | |
}); | |
}; | |
dispatcher.path_func = []; | |
setTimeout(function () { dispatcher(location.pathname); }, 0); | |
dispatcher('.', 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
$.fn.tap = function (func) { | |
$.ifFunction(func) ? func.call(this, this) : console.debug(this) | |
return this; | |
}; | |
$(‘div’).find(‘a’).tap(function () { | |
console.debug(this[0]); | |
}); |
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
(function ($) { | |
// ここで普通に書く | |
})(jQuery.noConflict(true)); |
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
$(function () { | |
var gmap = $('#gmap'); | |
if (!gmap.length) return; | |
$.getJSON(gmap.find(':hidden').val(), function (data) { | |
if (!GBrowserIsCompatible()) return; | |
var map = new GMap2(gmap.get(0)); | |
map.addControl(new GMapTypeControl()); | |
map.addControl(new GLargeMapControl()); | |
var bounds = new GLatLngBounds(); | |
var markers = []; |
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
(function () { | |
String.prototype.template = function (param) { | |
function esc (c) { return '&#'+c.charCodeAt(0)+';'; }; | |
var reg = new RegExp('[&"<>\']', 'g'); | |
return this.replace(/\[%(.+?)%\]/g, function (arg1, key) { | |
return ((param[key] || '')+'').replace(reg, esc); | |
}); | |
}; | |
})(); |
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
yum -y install gcc-c++ libpng-devel libjpeg-devel freetype* libxslt-devel | |
wget http://swfmill.org/releases/swfmill-0.3.0.tar.gz | |
tar xzf swfmill-0.3.0.tar.gz | |
cd swfmill-0.3.0 | |
wget http://lab.klab.org/files/flash/encoding.patch | |
patch -fp1 < encoding.patch | |
./configure | |
make && make install |
OlderNewer