Skip to content

Instantly share code, notes, and snippets.

CmdUtils.CreateCommand({
name: 'open add-on directory',
description: "Opens the add-on's install location.",
author: {name: 'satyr', email: '[email protected]'},
license: 'MIT',
icon: "chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png",
argument: noun_type_addon,
execute: function oad_execute({object: {data}}){
let profd = (Cc['@mozilla.org/file/directory_service;1']
.getService(Ci.nsIProperties)
#!perl
use strict;
use warnings;
use Net::Telnet;
use Win32::OLE;
my $mr = Net::Telnet->new(Port => 4242, Prompt => '/repl> /', Timeout => 1);
$mr->open();
$mr->cmd('{
content.focus();
function pageLoad_blankjack({location}){//function cmd_
if(location.href !== "about:blank") return;
location.replace("data:," + new Date);
Utils.currentChromeWindow.gURLBar.value = "";
}
<script xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
CmdUtils.makeSearchCommand({
name: 'trac',
url: 'https://ubiquity.mozilla.com/trac/search?q={QUERY}',
icon: 'https://ubiquity.mozilla.com/trac/chrome/common/trac.ico',
parser: {
title: 'a.searchable',
preview: 'dd.searchable',
maxResults: 10,
},
@satyr
satyr / __.css
Created September 22, 2009 12:03
@name __
diff --git a/bootstrap.py b/bootstrap.py
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -637,20 +637,20 @@ def install_python(home_dir, lib_dir, in
if sys.platform == 'cygwin' and os.path.exists(executable + '.exe'):
# Cygwin misreports sys.executable sometimes
executable += '.exe'
py_executable += '.exe'
logger.info('Executable actually exists in %s' % executable)
shutil.copyfile(executable, py_executable)
@satyr
satyr / _.htm
Created September 21, 2009 03:51
<p>
CmdUtils.CreateCommand({
name: 'google bookmark example?',
description: '?',
preview: function gbe_preview(pb){
pb.innerHTML = '...';
CmdUtils.previewAjax(pb, {
url: 'http://www.google.com/bookmarks/?output=xml',
dataType: 'text',
success: function gbe_success(xml){
var {bookmarks} = XML(xml.replace(/<\?[^>]*>/, ''));
@satyr
satyr / thank-you-mario.ubiq.js
Created September 15, 2009 22:36
Thank You Mario!
const TYM = 'http://wigflip.com/thankyoumario/';
CmdUtils.CreateCommand({
name: 'thank you mario',
description: 'Thank You Mario!'.link(TYM),
icon: 'http://wigflip.com/favicon.ico',
author: {name: 'satyr', email: '[email protected]'},
license: 'MIT',
arguments: {
object_message: noun_arb_text,
instrument_title: noun_arb_text,
(defun moz-exec (code)
(with-open-stream (mozrepl (connect "localhost" 4242))
(read-line mozrepl nil)
(princ code mozrepl)
(while (read-char-no-hang mozrepl nil))))
(defun run-ubiquity (in) (interactive "sUbiquity: ")
(moz-exec (concat "with(opener||self){minimize();restore();"
(format nil "gUbiquity.preview('~{\\u~4,'0X~}');"
(map 'list 'char-unicode in))