Skip to content

Instantly share code, notes, and snippets.

View hatebu.ubiq.js
Utils.extend(feed,
{ title: 'Hatena::Bookmark Commands'
, author: {name: 'satyr', homepage: 'http://d.hatena.ne.jp/murky-satyr'}
, license: 'MIT'
})
const
Hatebu = 'http://b.hatena.ne.jp/',
Hotent = Hatebu +'hotentry',
HLogin = 'https://www.hatena.ne.jp/login',
Icon = Hatebu +'favicon.ico',
@satyr
satyr / hotentry.ubiq.js
Created Sep 3, 2008
[Ubiquity] ホッテントリ
View hotentry.ubiq.js
const Name = 'hotentry',
Hatebu = 'http://b.hatena.ne.jp/',
Hotent = Hatebu +'hotentry',
HTML = <div class={Name}><style><![CDATA[
@ol {list-style:none; margin:0; padding:0}
@ol a {text-decoration:none}
@.selected {text-decoration:underline}
@kbd {font:bold 108% "Consolas", monospace; text-transform:uppercase}
@a img {border:none}
@.loading + .logo {opacity:0.4}
View twit.ubiq.js
+function(timeline, pdate){
const Twitter = 'https://twitter.com/';
const Icon = 'http://assets3.twitter.com/images/favicon.ico';
CmdUtils.CreateCommand({
name: "say",
icon: Icon,
takes: {status: noun_arb_text},
description: ''+ <>Sets/displays your
<a href={Twitter}>Twitter</a> status/timeline</>,
execute: function(input){
@satyr
satyr / thesaurus.ubiq.js
Created Sep 6, 2008
[Ubiquity] thesaurus.com
View thesaurus.ubiq.js
+function(pq){
const Thesaurus = 'http://thesaurus.reference.com/';
CmdUtils.CreateCommand({
name: "thesaurus",
icon: Thesaurus +'favicon.ico',
takes: {word: noun_arb_text},
description: ''+<>Consults <a href={Thesaurus}>thesaurus.com</a>.</>,
execute: function({text}){
Utils.openUrlInBrowser(makeReq(jQuery.trim(text)));
},
@satyr
satyr / google+.ubiq.js
Created Sep 7, 2008
[Ubiquity] google+
View google+.ubiq.js
+function(nums, pq, results, cursor, list){
const Google = 'http://www.google.com/',
noun_type_page = {
_name: 'page',
suggest: function(txt){
var n = ~~txt % (this.pages.length + 1);
return [{data: i, summary: i} for(i in this.pages) if(++i >= n)];
},
pages: [1],
};
@satyr
satyr / gimage.ubiq.js
Created Sep 9, 2008
[Ubiquity] Google Image
View gimage.ubiq.js
+function(nums, pq, results, cursor){
var noun_type_page = {
_name: 'page',
suggest: function(txt, htm)
[{data: i, summary: i} for(i in this.pages) if(++i >= +txt)],
pages: [1],
};
var noun_type_open = {
_name: 'open',
suggest: function(txt, m)
View dicg.ubiq.js
const Dicg = 'http://ext.dictionary.goo.ne.jp/',
Goo = 'http://goo.ne.jp/',
ID = '#_'+ (Math.random() +'').slice(2),
Base = <div class="dicg"><base href={Dicg}/><style><![CDATA[
@ul {padding-left:16px; margin:0 0 6px}
@h2, @h3 {font-size:96%; margin:0 0 4px}
@img, @.logo {background-color:#fff; border:none}
@li img {margin:0}
@li a + img {margin-left:2px}
@.logo {padding:4px 0; text-align:center; width:148px; height:40px}
@satyr
satyr / wayback.ubiq.js
Created Sep 19, 2008
[Ubiquity] web.archive.org
View wayback.ubiq.js
const Name = 'wayback', Wayback = 'http://web.archive.org/',
Base = '<style>'+ <![CDATA[
li {display:inline-block; font-family:monospace; margin-right:2.5em}
button {
padding:0; margin-right:0.3em; border-width:1px;
font:bold 104% monospace}
.error {font-style:oblique; line-height:1.8}
.logo {clear:both; display:inline-block}
.logo > img {vertical-align:middle}
.loading {opacity:0.9}
View caddy.xyzzy.l
; caddy (NOTE: make sure that golf.db has the script's name already)
(defun caddy (opt)
(execute-subprocess
(concat "sh -c \"/bin/ruby ~/scripts/golf/caddy/caddy.rb -n "
opt " " (get-buffer-file-name) "\"")
t "*caddy*")
(other-window))
(defun caddy-l () (interactive) (caddy "-l"))
(defun caddy-r () (interactive) (caddy "-r -y"))
(global-set-key #\F7 'caddy-l)
View fff.bml.js
/*
javascript:FetchFullFeed:['http://gist.github.com/15651.txt',function(d,i,e){for(i=this.length;--i;d.body.appendChild(e))e=d.createElement('script'),e.src=this[i]].reverse()[0](document)
*/
with(document)!function(){
var list = body.insertBefore(createElement('ul'), body.firstChild);
list.style.cssText =
('position:fixed; top:5px; left:5px; z-index:999999;'+
'text-align:left; background-color:menu; color:menutext;'+
'width:auto; height:auto; max-height:none; max-width:none;'+
'margin:0; padding:5px; font:normal 14px monospace;'+
You can’t perform that action at this time.