Skip to content

Instantly share code, notes, and snippets.

Satoshi Murakami satyr

Block or report user

Report or block satyr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fff.bml.js
var list = body.insertBefore(createElement('ul'), body.firstChild); =
('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;'+
View doukaku209.groovy
String fun(String fpath, List mods, Closure sorter){
def r = new File(fpath).text.trim().split(/\r?\n/)*.tokenize('\t')
mods.each{ r.(it.maximumNumberOfParameters==2?'eachWithIndex':'each') it }
[r.head(), *r.tail().sort(sorter)]*.join('\t').join('\n')
print fun('data.csv', [
{ it[0..3] = it[0, 2, 1, 3] },
{ a, i -> if(i){ [0, 3].each{ a[it] = a[it].toInteger() }; ++a[3] } },
]){ it[0] }
View gist:19338
(defun show-bytes () (interactive)
(let ((fn (get-buffer-file-name)))
(message (concat "buffer: ~D"
(if fn (format nil " file: ~D" (file-length fn)) ""))
(global-set-key #\C-b 'show-bytes)
View google-one-touch.user.js
// ==UserScript==
// @name google-one-touch
// @description Adds keyboard shortcuts to each entry.
// @namespace
// @include*
// ==/UserScript==
var splinks = document.getElementById('mbEnd');
if(splinks) splinks.parentNode.removeChild(splinks);
addEventListener('load', function onload(){
View cMenuOpener.uc.js
(function addURIOpenerToCMenu(opts){
var mi = document.createElement('menuitem');
mi.setAttribute('label', opts.label);
mi.setAttribute('accesskey', opts.accesskey);
mi.opener = opts.opener; = function run(){
var {path, args} = this.opener;
with(gContextMenu) var uri = isTextSelected
? getSelectedURI()
: (onLink ? linkURI : gBrowser.currentURI).spec;
View wedatajsoninput.user.js
// ==UserScript==
// @name WedataJSONInput
// @namespace
// @description Fills the form by prompting json text.
// @include*/items/new
// @include*/edit
// ==/UserScript==
with(document) with(getElementById('item').appendChild(createElement('a'))){
href = 'javascript:';
innerHTML = '<b>[JSON]</b>';
View gist:21615
(defun run-console () (interactive)
"cmd /k clear&&title cmd&&prompt $P$S[$D$S$T]$S$M$_$+$G$S"))
(defvar *last-command-cmd* "")
(defun command-cmd (cmd) (interactive "e> " :history0 'execute)
(substitute-string (setq *last-command-cmd* cmd)
"\\?\\?" (or (get-buffer-file-name)
(buffer-name (selected-buffer))))
View gist:21641
(defvar *twitter-auth* "user:pass")
(defun twitter-update-with-curl (stat) (interactive "sTwitter: ")
(let ((twit "-d source=curl")
(stat (si::www-url-encode (map-internal-to-utf-8 stat)
nil "-0-9A-Za-z._~")))
(message "~D" (execute-shell-command
(format nil "curl -s -u ~A -d status=~A ~A"
*twitter-auth* stat twit)))))
(global-set-key #\C-\\ 'twitter-update-with-curl)
View yats.ubiq.js
+function(pq, list){
const Yats = '';
name: "yats",
icon: '',
takes: {'search formula': noun_arb_text},
modifiers: {'in': noun_type_language},
description: 'yet another twitter search'.link(Yats),
execute: function(inp, mod){ Utils.openUrlInBrowser(makeQ(inp, mod)) },
preview: function(pbl, inp, mod){
satyr / jamazon.ubiq.js
Last active May 12, 2016 (Ubiquity 0.5.4+)
View jamazon.ubiq.js
var Name = 'jamazon',
Jamazon = '',
ItemMax = 35,
Logo = '<a class="logo" href="'+ Jamazon +'" accesskey="0">'
+ '<img border="0" width="126" height="28" align="middle" src="'
+ ''
+ 'navAmazonLogoFooter._V28243234_.gif'
+ '"/></a>',
Base = '<style>\
.head {padding:0 0.4em}\
You can’t perform that action at this time.