Skip to content

Instantly share code, notes, and snippets.

@satyr
satyr / eijiro.ubiq.js
Last active February 4, 2016 13:26
英辞郞
const Name = 'eijiro', EOW = 'http://eow.alc.co.jp/',
Base = '<style>\
body {line-height:1.3}\
ul, ol {padding-left:1.2em}\
ul, ol, li {margin:0 0 0.2em}\
font {color:inherit}\
a img {border:none}\
.button {padding:0; border-width:1px; text-transform:uppercase}\
.button[disabled] {background-color:transparent; color:inherit}\
.button, #paging > a {font:bold 92% monospace}\
@satyr
satyr / hatebu.ubiq.js
Created September 1, 2008 22:29
はてブ
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 September 3, 2008 12:02
[Ubiquity] ホッテントリ
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}
+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 September 6, 2008 10:15
[Ubiquity] thesaurus.com
+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 September 7, 2008 09:07
[Ubiquity] google+
+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 September 9, 2008 06:40
[Ubiquity] Google Image
+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)
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 September 19, 2008 12:28
[Ubiquity] web.archive.org
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}
; 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)