Skip to content

Instantly share code, notes, and snippets.

@littlefolk
littlefolk / bartab-integration.js.patch
Created June 15, 2010 19:33
vimperator plugin patch: bartab-integration.jsをBarTab 2.0でも動くように
diff --git a/bartab-integration.js b/bartab-integration.js
index 3878e46..69b5c55 100644
--- a/bartab-integration.js
+++ b/bartab-integration.js
@@ -38,7 +38,7 @@ function barTap_bufferCompletion (context) {
<span highlight="Indicator" style="display: inline-block; width: 2em; text-align: center">{item.item.indicator}</span>
{ process.call(this, item, text) }
</>];
- context.completions = util.map(tabs.browsers, function ([i, browser]) {
+ context.completions = util.map(util.Array.iteritems(gBrowser.mTabs), function ([i, browser]) {
@gifnksm
gifnksm / nicovideo_createPanel.js
Created October 20, 2010 11:42
ニコニコ動画のwatchページのタブを追加する関数
function nicovideo_createPanel(id, labelText) {
let panelID = 'itab_' + id;
let label = document.createElement('a');
label.href = '#' + panelID;
label.innerHTML = '<div>' + labelText + '</div>';
// remove extra <a>...</a>
label.firstChild.textContent = labelText;
document.querySelector('#itab td').appendChild(label);
@os0x
os0x / minibuffer.user.js
Created January 30, 2011 11:05
Minibuffer mod
// ==UserScript==
// @name Minibuffer
// @namespace http://white.s151.xrea.com/
// @description Minibuffer
// @include *
// ==/UserScript==
var VERSION = "2009.12.06 mod/2011.01.30";
var Class = function(){return function(){this.initialize.apply(this,arguments)}};
@os0x
os0x / ldrize.user.js
Created January 30, 2011 11:07
LDRize mod
// ==UserScript==
// @name LDRize
// @namespace http://white.s151.xrea.com/
// @description j,k,v,p,o,:,f,? + l,s,i
// @include http://*
// @include https://*
// @include file:///*
// ==/UserScript==
const SCRIPT_VERSION = "2010.10.27 mod/2011.01.30"
@azu
azu / nicovideo_createPanel.js
Created February 27, 2011 05:24 — forked from gifnksm/nicovideo_createPanel.js
ニコニコ動画のwatchページのタブを追加する関数(Firefox依存なし)
// http://blog.livedoor.jp/eeu/archives/55316335.html
var addClassName = function(el, className) {
var reg = new RegExp('(^| +)' + className + '($| +)');
if (!reg.test(el.className))
el.className += ' ' + className;
};
var removeClassName = function(el, className) {
var reg = new RegExp('(^| +)' + className + '($| +)');
el.className = el.className.replace(reg, ' ');
};
// ==UserScript==
// @name Minibuffer
// @namespace http://white.s151.xrea.com/
// @description Minibuffer
// @include *
// ==/UserScript==
var VERSION = "2009.12.06"; // 2011.03.25 for firefox 4.0 via http://d.hatena.ne.jp/wlt/20110106/1294306315
var Class = function(){return function(){this.initialize.apply(this,arguments)}};
@tily
tily / scaling_isomorphic_javascript_code.ja.markdown
Last active May 1, 2023 09:03
サバクラ両方で動く JavaScript の大規模開発を行うために

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。

@958
958 / ldrnail.ks.js
Last active September 28, 2015 02:27
[keysnail]LDRnail
// Info
let PLUGIN_INFO =
<KeySnailPlugin>
<name>LDRnail</name>
<description>LDRize clone with KeySnail</description>
<description lang="ja">LDRize を KeySnail で</description>
<iconURL>https://sites.google.com/site/958site/Home/files/ldrnail.png</iconURL>
<updateURL>https://gist.github.com/958/1369730/raw/ldrnail.ks.js</updateURL>
<author>958</author>
@anekos
anekos / read-code-of-commands-or-mappings.vim
Created March 9, 2012 10:18
Vimperator でコマンドやマッピングのコードを見てみる。
" コマンド
:echo commands.get('コマンド名').action
" マッピング
:echo mappings.get(modes.NORMAL, '<C-n>').action