This file contains 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
// $X | |
// | |
// usage: | |
// | |
// $X(aExpression); | |
// $X(aExpression, aContext, aType); | |
// $X(aExpression, aContext, aType, aResolver, aNamespaceHash); | |
// $X(aNamespaceHash, aResolver, aType, aContext, aExpression); | |
// | |
// or |
This file contains 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 SBM Comments Viewer | |
// @namespace http://white.s151.xrea.com/wiki/index.php?script/SBMCommentsViewer | |
// @description Show social bookmark's comments at the bottom of your browser. | |
// @include * | |
// ==/UserScript== | |
// by snj14 | |
// Cc-by http://creativecommons.org/licenses/by/2.1/jp/ |
This file contains 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 SBM Count With Google | |
// @namespace http://white.s151.xrea.com/ | |
// @description show SBM count in Google search result | |
// @include http://www.google.*/*q=* | |
// ==/UserScript== | |
// by snj14 | |
// Cc-by http://creativecommons.org/licenses/by/2.1/jp/ | |
This file contains 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
// XHR -- XMLHttpRequest | |
// Argmunets | |
// | |
// url | |
// method | |
// data | |
// headers | |
// Accept | |
// Referer |
This file contains 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
// this is shortcut key library that multi stroke key support. | |
// this library depends on Arrow.js [ http://github.com/motemen/arrow-js/wikis ] | |
// Key | |
// 文字列で定義されたショートカットキーとキーイベントの差を吸収して比較できるようにする | |
function Key(aObject){return (this instanceof Key) ? this.init(aObject) : new Key(aObject)}; | |
// test function | |
Key.Test = function(){ |
This file contains 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
// this function works on firefox extension. | |
function log(){ | |
const Ci = Components.interfaces; | |
const Cc = Components.classes; | |
function firebug(method, args){ | |
var windowManager = Cc['@mozilla.org/appshell/window-mediator;1'].getService(Ci.nsIWindowMediator); | |
var win = windowManager.getMostRecentWindow("navigator:browser"); | |
if(win.FirebugConsole && win.FirebugContext) { |
This file contains 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
// this is library for RDF | |
// usage: | |
// | |
// var rdf = RDF("chrome://hoge/content/test.rdf"); // note: this is synchronous. not asynchronous. | |
// | |
// rdf.getAsXML() // => "<xml>....</xml>" | |
// | |
// rdf.query() | |
// .prefix({ |
This file contains 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 permutation(array){ | |
return array.reduce(function(prev,current){ | |
var res = []; | |
prev.forEach(function(pe){ | |
if(!pe['length']) pe = [pe]; | |
return current.forEach(function(ce){ | |
res.push(pe.concat([ce])) | |
}) | |
}) | |
return res |
This file contains 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
;; reqpen-recent-closed-file | |
(defvar recent-closed-files nil) | |
(defun collect-recent-closed-files () | |
(when buffer-file-name | |
(push buffer-file-name recent-closed-files))) | |
(add-hook 'kill-buffer-hook 'collect-recent-closed-files) | |
(defun reopen-recent-closed-file () | |
(interactive) | |
(when recent-closed-files | |
(let (path) |
This file contains 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
--- highlight-indentation.el 2012-01-30 00:21:47.921213987 +0900 | |
+++ highlight-indentation.el.mod 2012-01-30 00:21:40.649213762 +0900 | |
@@ -46,8 +46,14 @@ | |
on spaces" | |
:lighter " ||" | |
(when highlight-indentation-current-regex ;; OFF | |
- (font-lock-remove-keywords nil `((,highlight-indentation-current-regex | |
- (1 'highlight-indentation-face))))) | |
+ (font-lock-remove-keywords nil `(("^ +" | |
+ (,highlight-indentation-current-regex |