Skip to content

Instantly share code, notes, and snippets.

/*=skin=
@name elasty
@author satyr
@email murky.satyr@gmail.com
@homepage http://gist.github.com/80593
@h0mepage http://d.hatena.ne.jp/murky-satyr/20090319/elasty_ubiq_css
@license MIT
=/skin=*/
#fake-global-for-stylish {}
const GDMP = 'http://code.google.com/p/google-diff-match-patch/',
PrevLen = 256;
XML.ignoreWhitespace = XML.prettyPrint = false;
(function diffCommand(o){
o.name = 'diff '+ o.name;
o.icon = 'http://code.google.com/favicon.ico';
o.description =
<>Gets the <a href={GDMP}>diff</a> of {o.description}.</>;
o.author = 'satyr';
o.license = 'MIT';
@satyr
satyr / now.ubiq.js
Created March 20, 2009 23:03
Copies/inserts current datetime as specified format
const Sample = new Date, Formats = [
'%Y-%m-%d', '%H:%M:%S', '%Y-%m-%d %H:%M:%S', '%Y-%m-%dT%H:%M:%SZ', ''];
CmdUtils.CreateCommand({
name: 'now',
icon: 'chrome://ubiquity/skin/icons/favicon.ico',
description: 'Copies/inserts current datetime as specified format.',
help: Formats.reduce(function(ul, f){
return ul.appendChild(<li>{Sample.toLocaleFormat(f)}</li>);
}, <ul style="list-style-image:none"/>) +'',
takes: {format: {_name: 'f',
/* appjet:version 0.1 */
import('lib-at0m');
N = +request.path.slice(1) || 1e3;
A = Atom.Person('ラレコ', {uri: 'http://blog.livedoor.jp/yawaraka_sensha/'});
J = wget('http://query.yahooapis.com/v1/public/yql?format=json&q='+
encodeURIComponent(
'select * from html'+
' where url="http://anime.livedoor.com/tsumami/work.html"'+
' and xpath="//h3/a"'));
// ==UserScript==
// @name Appjet Gist Sync
// @description Syncs Appjet publishing to Gist posting/updating
// @namespace http://d.hatena.ne.jp/murky-satyr
// @name$pace http://d.hatena.ne.jp/youpy/
// @include http://appjet.com/app/*/ide
// ==/UserScript==
if(top !== self) return;
const {URL} = document, [AppID] = /\d+/(URL);
/* appjet:version 0.1 */
import('storage', 'cron', 'dlog');
const
Cache = storage.cache,
TimeLimit = 5e3,
CacheSpan = 24 * 60 * 60e3;
if(request.isCron){
deleteCache(20);
unscheduleAll();
@satyr
satyr / ubigist.app.js
Created March 21, 2009 13:09
Ubiquity feeds on Gist
/* appjet:version 0.1 */
http://validator.w3.org/feed/check.cgi?url=http://ubigist.appjet.net/atom
import('storage', 'cron', 'dlog');
const
Ubi = 'https://ubiquity.mozilla.com/',
Gist = 'http://gist.github.com/',
Me = 'http://'+ appjet.appName +'.'+ appjet.mainDomain +'/',
GS = storage.gists,
{o: O, n: N, r: R} = request.params,
Sep = ' \u2014 ',
Utils.extend(feed, {title: '4u', author: 'satyr', license: 'MIT'});
XML.prettyPrinting = XML.ignoreWhitespace = false;
const
Name = '4u',
FU = 'http://4u-beautyimg.com/',
_Name = '_'+ Name,
Base = '<style>'+ <![CDATA[
.entry-photo {display:inline-block; position:relative}
.entry-photo img {margin:0 !important}
img {border:none; vertical-align:top}
// ==UserScript==
// @name OperaStyle_menuAccessKey.uc.js
// @namespace http://d.hatena.ne.jp/Griever/
// @include main
// ==/UserScript==
var menuAccessKey = {
HINTKEYS : new String('abcdefghijklmnopqrstuvwxyz0123456789'),
init : function(){
window.addEventListener('popupshown', this, false);
@satyr
satyr / x
Created March 23, 2009 10:02 — forked from cers/x
CmdUtils.CreateCommand({
name: "example",
takes: {"search term": /.*/},
preview: function(pblock, input) {
CmdUtils.previewGet(pblock, "http://google.com/search", {q: input.text}, function(data){
pblock.innerHTML = data;
});
}
});