This file contains hidden or 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 flag; | |
function reset(){ flag = 'off' } | |
function ubiquityLoad_resetFlag(U){ | |
U.msgPanel.addEventListener('popuphidden', reset, false); | |
} | |
CmdUtils.CreateCommand({ | |
name: 'test flag reset', | |
argument: noun_arb_text, | |
preview: function pv(pb){ | |
pb.innerHTML = flag; |
This file contains hidden or 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 gKey = '@', root = this; | |
const HHO = { | |
keys: 'hjkluiopnm', | |
bind: { | |
click: 'return', | |
click1: '@ comma space', | |
click2: 'C_return', | |
focus: 'f period', | |
undo: 'back_space delete', | |
}, |
This file contains hidden or 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
content conhis chrome/content/ | |
overlay chrome://browser/content/browser.xul chrome://conhis/content/conhis.xul |
This file contains hidden or 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 cmd_codeURIComponent(_){ | |
var name = _ + 'codeURIComponent', fn = this[name]; | |
CmdUtils.CreateCommand({ | |
name: name, | |
icon: 'chrome://ubiquity/skin/icons/convert.png', | |
argument: noun_arb_text, | |
execute: function({object: {text}}){ | |
if (!text) return; | |
try { var r = fn(text) } | |
catch(e){ displayMessage(_ +'code error', this); return } |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
import wsgiref.handlers | |
from google.appengine.ext import webapp | |
#from google.appengine.api import urlfetch | |
class Form(webapp.RequestHandler): | |
def get(self): | |
self.response.out.write("""\ | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
This file contains hidden or 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 JGate Hacks | |
// @namespace http://d.hatena.ne.jp/murky-satyr | |
// @include http://apps.jgate.de/platform/edit?* | |
// ==/UserScript== | |
setTimeout(function(){ | |
var {$, editor} = unsafeWindow; | |
var name = location.search.slice(1); | |
var form = document.forms[0].wrappedJSObject; | |
$(form.code).remove(); |
This file contains hidden or 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://search.cpan.org/~dankogai/Regexp-Trie-0.02/lib/Regexp/Trie.pm | |
function RegexpTrie(strs, prefixes) { | |
var me = {$: {}, __proto__: arguments.callee.fn}; | |
if (strs) { | |
let add = prefixes ? "addPrefixes" : "add"; | |
for each (let str in strs) me[add](str); | |
} | |
return me; | |
} | |
RegexpTrie.fn = { |
This file contains hidden or 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
/* This is a template command. */ | |
CmdUtils.CreateCommand({ | |
name: "example", | |
description: "(A short description of your command)", | |
help: "(How to use your command)", | |
icon: "http://www.mozilla.com/favicon.ico", | |
author: {name: "Your Name", email: "[email protected]"}, | |
license: "GPL", | |
homepage: "http://www.mozilla.com/", | |
arguments: {object: noun_arb_text}, |
This file contains hidden or 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
CmdUtils.CreateCommand({ | |
name: "test-bin", | |
arguments: noun_arb_text, | |
execute: function({object: {text, html}}){ | |
Bin.text(text || null); | |
Bin.html(html || null); | |
}, | |
preview: function(pbl){ | |
pbl.innerHTML = <p>{Bin.text()}</p>.toXMLString() + Bin.html(); | |
}, |
This file contains hidden or 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
#!ruby | |
$> << (<<"." | |
_ = {_: ''}; | |
#{ (1..9).map{|i| "#{i} = ++0;" }.join } | |
// 'constructor' => Function | |
_.______ = _[_.______ = | |
(c = (_.___ = ''+ {})[5]) + // '[object Object]' | |
_.___[1] + | |
(_.____ = ''+ _[_])[6] + // 'undefined' | |
(''+ !_)[3] + |