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
With the prefs: | |
group bar = 0 | |
tab bar = 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
/** | |
* Usage: | |
* var socket = Ext.create('MyApp.data.SocketIO', { | |
* host: 'localhost', | |
* port: 80 | |
* }); | |
* | |
* License: The MIT License | |
* Copyright (c) 2013 ClearCode Inc. / YUKI "Piro" Hiroshi | |
*/ |
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
/** | |
* Original: | |
* http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/nsBlocklistService.js?raw=1 | |
* Usage: | |
* 1. Go to "about:config" and turn "devtools.chrome.enabled" to "true". | |
* 2. Start "Scratchpad" with Shift-F4. | |
* 3. Change the context from "web page" to "browser". | |
* 4. Copy this script and paste to the scratchpad. | |
* 5. Run it. | |
* Sample result: |
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 canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); | |
canvas.width = 100; | |
canvas.height = 100; | |
canvas.setAttribute('style', 'width:100px;height:100px;position:fixed;top:0;right:0;z-index:10000;'); | |
document.documentElement.appendChild(canvas); | |
var context = canvas.getContext('2d'); | |
function random(max) { | |
return parseInt(Math.random() * max); | |
} |
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
/** | |
* Usage: | |
* var matcher = GroongaStringUtils.getTermsMatcher('検索 OR けんさく'); | |
* // => /(a pattern to match all search terms in the given query)/g | |
* document.body.innerHTML = document.body.innerHTML | |
* .replace(matcher, function(term) { return '<em>' + term + '</em>'; }); | |
* | |
* License: The MIT License | |
* Copyright (c) 2013 ClearCode Inc. | |
*/ |
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(){ | |
Components.utils.import('resource://gre/modules/ctypes.jsm'); | |
var library = ctypes.open(ctypes.libraryName('nss3')); | |
var PR_Free = library.declare( | |
'PR_Free', | |
ctypes.default_abi, | |
ctypes.void_t, | |
ctypes.voidptr_t | |
); | |
var ptr = new ctypes.voidptr_t(0123); |
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
/** | |
* @fileOverview JSDeferred flavoured Promise.jsm | |
* @author [email protected] | |
* @version 0.1 | |
* @license | |
* JSDeferred flavoured Promise.jsm Copyright (c) 2014 YUKI "Piro" Hiroshi | |
* JSDeferred Copyright (c) 2007 cho45 ( www.lowreal.net ) | |
* | |
* Original: http://github.com/cho45/jsdeferred | |
* |
OlderNewer