Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Twiteaks
// @namespace http://d.hatena.ne.jp/murky-satyr
// @include http://twitter.com/*
// @include https://twitter.com/*
// ==/UserScript==
// LongURLize => http://gist.github.com/103277
var [, user, sid] =
@satyr
satyr / HTMLValidator.jp.js
Created December 6, 2009 11:23
HTMLValidator for Jetpack
// (C) http://sites.google.com/site/kanasanjs/jetpack_work_shop#nanto_vi&satyr
// License: Creative Commons <http://creativecommons.org/licenses/by/3.0/>
var manifest = { settings: [
{name: 'auto', type: 'boolean', label: 'Auto Validation', default: true},
]},
gLogo = ''+ <a id="logo" href="/"/>.appendChild(
<img src="http://www.w3.org/2008/site/images/favicon.ico"/>),
gCache = {};
jetpack.future.import('storage.settings');
jetpack.statusBar.append({
CmdUtils.makeSearchCommand({
name: 'ubiquity 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,
},
});
function cmd_toggle_autohide(){
displayMessage(toggleAutoHide(context.chromeWindow.gUbiquity), this);
}
function toggleAutoHide(U){
var p = U.msgPanel, nah = noAutoHide(p), b = nah !== 'on';
p.setAttribute('noautohide', b);
p[(b ? 'add' : 'remove') +'EventListener']('keydown', manualHide, false);
return nah;
}
function noAutoHide(p){
@satyr
satyr / rubiquity.rb
Created November 13, 2009 21:14
Ruby (→ MozRepl → js-ctypes → WIN32API/OLE) → Ubiquity
#!ruby
require 'net/telnet'
require 'win32ole'
prompt = /^repl> /
mozrepl = Net::Telnet.new 'Port'=> 4242, 'Prompt'=> prompt, 'Timeout'=> 5
mozrepl.waitfor prompt
res = ''
mozrepl.cmd(<<'JS'){|s| s.slice! prompt; res << s }
try {
@satyr
satyr / [email protected]
Created November 10, 2009 09:23
caret@hint
javascript:[{/* caret@hint for Firefox (keyconfig or bookmarklet) */
keys: 'hjkluiopnm',
bind: {
/* moves to head/tail of hit node (selects with shift) */
head: 'space , < [ {',
tail: 'return . > ] }',
pick: '@ S s', /* selects hit node */
free: '0 F f', /* deselects all */
undo: 'back_space ^ ~',
},
@satyr
satyr / eLasty.ubiq.css
Created November 6, 2009 20:29
1280x800 + Fx3.6↑ + Ubiq5.5pre8↑ + extensions.ubiquity.openAt=0,0
/*=skin=
@name eLasty
@author satyr
@license MIT
@homepage http://gist.github.com/228271
=/skin=*/
@-moz-document url(chrome://browser/content/browser.xul) {
#ubiquity-panel {
@satyr
satyr / insert.ubiq.js
Created October 17, 2009 01:14
Insertion
CmdUtils.CreateCommand({
names: ['insert HTML', 'Zen Coding'],
description: (
'Inserts HTML, using pseudo '+
'Zen Coding'.link('http://code.google.com/p/zen-coding/') +'.'),
help: ('Try: <code>dl#id.cla.ss > dt{selection: ~}'+
' + dd > input[name=foo][disabled]*2</code>'),
icon: 'chrome://ubiquity/skin/icons/html_go.png',
argument: {object_ZC: noun_arb_text},
execute: function ihtm_execute({object: {text}}){
@satyr
satyr / arcref.pl
Created October 16, 2009 21:07
ArcRef
#!perl
use strict;
use warnings;
use File::Basename;
unless(@ARGV){
print "usage: $0 {def/mac name}\n";
exit 1;
}
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://landmarks/skin/default.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://landmarks/locale/landmarks.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<div id="landmarksmain" xmlns="http://www.w3.org/1999/xhtml"></div>
<script type="application/javascript">