This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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;'+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun show-bytes () (interactive) | |
(let ((fn (get-buffer-file-name))) | |
(message (concat "buffer: ~D" | |
(if fn (format nil " file: ~D" (file-length fn)) "")) | |
(buffer-size)))) | |
(global-set-key #\C-b 'show-bytes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name google-one-touch | |
// @description Adds keyboard shortcuts to each entry. | |
// @namespace http://d.hatena.ne.jp/murky-satyr | |
// @include http://www.google.tld/* | |
// ==/UserScript== | |
var splinks = document.getElementById('mbEnd'); | |
if(splinks) splinks.parentNode.removeChild(splinks); | |
addEventListener('load', function onload(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WedataJSONInput | |
// @namespace http://d.hatena.ne.jp/murky-satyr | |
// @description Fills the form by prompting json text. | |
// @include http://wedata.net/databases/*/items/new | |
// @include http://wedata.net/items/*/edit | |
// ==/UserScript== | |
with(document) with(getElementById('item').appendChild(createElement('a'))){ | |
href = 'javascript:'; | |
innerHTML = '<b>[JSON]</b>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun run-console () (interactive) | |
(launch-application | |
"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) | |
(execute-shell-command | |
(substitute-string (setq *last-command-cmd* cmd) | |
"\\?\\?" (or (get-buffer-file-name) | |
(buffer-name (selected-buffer)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar *twitter-auth* "user:pass") | |
(defun twitter-update-with-curl (stat) (interactive "sTwitter: ") | |
(let ((twit "-d source=curl http://twitter.com/statuses/update.json") | |
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+function(pq, list){ | |
const Yats = 'http://pcod.no-ip.org/yats/'; | |
CmdUtils.CreateCommand({ | |
name: "yats", | |
icon: 'http://twitter.com/favicon.ico', | |
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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Name = 'jamazon', | |
Jamazon = 'http://www.amazon.co.jp/', | |
ItemMax = 35, | |
Logo = '<a class="logo" href="'+ Jamazon +'" accesskey="0">' | |
+ '<img border="0" width="126" height="28" align="middle" src="' | |
+ 'http://g-ecx.images-amazon.com/images/G/09/gno/images/general/' | |
+ 'navAmazonLogoFooter._V28243234_.gif' | |
+ '"/></a>', | |
Base = '<style>\ | |
.head {padding:0 0.4em}\ |