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
# スコープを作るメソッド | |
scope := method( | |
expr := call message arguments first | |
context := Object clone | |
msg := message(do) | |
msg setNext(expr) | |
context prependProto(call sender) | |
context forward := method( | |
self proto doMessage(call message clone do( setNext(nil) )) | |
) |
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
Foo := Object clone | |
Foo bar := method( | |
# 呼び出し元の値を参照 | |
call sender v println | |
# 呼び出し元の値を書き換え! | |
call sender v = "new value" | |
) | |
Object clone do( | |
v := "local value" |
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
import System.IO | |
import Network.URI | |
import Network.HTTP | |
import Network.Stream | |
import Control.Concurrent | |
padnum n | n < 10 = '0' : show n | |
| otherwise = show n | |
filename h m = padnum h ++ padnum m ++ ".jpg" |
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 channelPattern = /#(vimperator|anekos)@.*/; | |
// 色々置換したりする | |
function textFilter (s) { | |
return s; | |
} | |
function event::onLoad(){ | |
log('onLoad - google translator'); |
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
// @name Session Manager | |
// @description for "Session Manager" addon | |
// @description-ja for "Session Manager" addon | |
// @license Creative Commons 2.1 (Attribution + Share Alike) | |
// @version 1.0 | |
// @author anekos (anekos@snca.net) | |
// @maxVersion 2.0pre | |
// @minVersion 2.0pre | |
// ==/VimperatorPlugin== | |
// |
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, letを使わないこと | |
(function(n,c)c.match('(.{'+n+'})+')[0].split("").reduce(function(p,c,i)(p[i%n]=(p[i%n]||'')+c,p),[]))(6,"01234501234501234578") |
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(){ | |
// util function | |
// {{{ | |
let echo = function (str) { | |
setTimeout(function () liberator.echo(str), 100); | |
}; | |
let log = liberator.log; | |
let dlog = function (delay, func) { | |
setTimeout(function () log(func()), delay * 1000); | |
}; |
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 | |
require "rexml/document" | |
txt_source_dir = 'C:/root/project/coderepos/vimp-doc/2.0/vimperator-help-ja/locale/ja/' | |
xml_source_dir = 'C:/root/project/vimperator/origin/common/locale/en-US/' | |
dest_dir = 'c:/root/home/anekos/temp/vimploc/' | |
txt_source_dir, xml_source_dir, dest_dir = *ARGV if ARGV.size >= 3 |
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
const stackPattern = /(zip-de-download|hoge)\.js/; | |
function popupAlert (iconPath, title, text, buttonEnabled, a, b) { | |
const ALERT_SVC = | |
Components.classes["@mozilla.org/alerts-service;1"]. | |
getService(Components.interfaces.nsIAlertsService); | |
ALERT_SVC.showAlertNotification.apply(ALERT_SVC, arguments); | |
} | |
function simplePopupAlert (title, text) { |
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 | |
class Pos | |
include Enumerable | |
attr_reader :x, :y, :route | |
def initialize (x, y) | |
@x, @y, @route = x, y, [] | |
end | |
def each (&block) |
OlderNewer