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
// http://vimperator.g.hatena.ne.jp/voidy21/20100119/1263907211 の改良(?)版 | |
(function () { | |
let U = liberator.plugins.libly.$U; | |
function jump (url) { | |
let index = 0; | |
let url = util.stringToURLArray(url).toString(); | |
for each ( [,tab] in tabs.browsers ) { | |
if(url == tab.currentURI.spec){ |
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
// 以下の assert は全部通る。 | |
let a1 = [{}, 1, 2]; | |
let a2 = a1.concat(); | |
assertEqual('A0', false, function () a1 === a2); | |
assertEqual('A1', false, function () a1 === ({})); | |
assertEqual('A2', true, function () a1[0] === a2[0]); | |
let b1 = [{}, 1, 2]; |
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
#!/usr/bin/ruby | |
p "#{:hello_world}" | |
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
let ( | |
back = mappings.getDefault(modes.NORMAL, '<C-o>').action, | |
remove = mappings.getDefault(modes.NORMAL, 'd').action | |
) | |
mappings.addUserMap( | |
[modes.NORMAL], | |
['<C-o>'], | |
'http://d.hatena.ne.jp/nyama/20100208/1265617681', | |
function () (gBrowser.sessionHistory.index > 0 ? back : remove)(-1) | |
); |
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
Components.utils.import("resource://gre/modules/ctypes.jsm"); | |
let RUBYLIB_DEF = { | |
ruby_init: [ctypes.void_t], | |
rb_eval_string_protect: [ctypes.uint32_t, ctypes.string, ctypes.uint32_t], | |
}; | |
let rubydll = ctypes.open('msvcrt-ruby18.dll'); | |
let ruby = {}; | |
for (let [name, def] in Iterator(RUBYLIB_DEF)) |
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
var PLUGIN_INFO = | |
<VimperatorPlugin> | |
<name>heuristic-search</name> | |
<description>Heuristic search</description> | |
<author mail="hitode909@gmail.com" homepage="http://www.hatena.ne.jp/hitode909/">hitode909</author> | |
<version>0.2</version> | |
<detail><![CDATA[ | |
== Commands == | |
:hsearch {keywords} |
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 () { | |
let convertString = function (str, charset) { | |
let sis = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream); | |
sis.setData(str, str.length); | |
let cis = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(Ci.nsIConverterInputStream); | |
cis.init(sis, charset, 1024, Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); |
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
'<C-n> <C-p>'.split(/\s/).forEach( | |
function (key) | |
mappings.addUserMap( | |
[modes.INSERT], | |
[key], | |
'', | |
function () mappings.getDefault(modes.NORMAL, key).action(1) | |
) | |
) |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("nicovideo.jp") { | |
.bg_headmenu { | |
display: none !important; | |
} | |
} | |