Skip to content

Instantly share code, notes, and snippets.

View hotchpotch's full-sized avatar
🏠
Working from home

Yuichi Tateno (secon) hotchpotch

🏠
Working from home
View GitHub Profile
#!/usr/bin/env ruby
require 'readline'
require 'socket'
host = ARGV.shift || 'localhost'
port = ARGV.shift || 4444
history_file = nil
begin
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
coderepos_dir = Pathname.new(ENV['HOME']).join('svn/coderepos/lang/javascript/vimperator-plugins/trunk/')
vimp_dir = Pathname.new("/mnt/c/Documents\ and\ Settings/gorou/vimperator/plugin/")
cc = coderepos_dir.children
vimp_dir.children.each do |plugin|
/*
* %s, %d, %f only
*/
const _SPRINTF_HASH = {
'%s': String,
'%d': parseInt,
'%f': parseFloat,
};
var sprintf = function (str) {
" mappings
noremap <BS> <NOP>
noremap j 5j
noremap J <C-d>
noremap k 5k
noremap K <C-u>
noremap L l
noremap H h
noremap h <C-p>
commands.addUserCommand(['bdd[omain]'],
'buffer delete by match domain',
function (args) {
var domain = args.string;
let count = 0;
Application.activeWindow.tabs.forEach(function(t) {
// t #=> fuelIBrowserTab
if (t.uri.scheme.indexOf('http') != -1 &&
t.uri.host.indexOf(domain) != -1) {
t.close();
*** fuzzyfinder.vim.org 2009-04-13 14:42:27.000000000 +0900
--- fuzzyfinder.vim 2009-03-12 11:30:02.000000000 +0900
***************
*** 569,574 ****
--- 569,581 ----
return a:str[:(a:len - len(s:ABBR_TRIM_MARK) - 1)] . s:ABBR_TRIM_MARK
endfunction
+ function! s:TrimFirst(str, len)
+ if a:len <= 0 || len(a:str) <= a:len
mappings.addUserMap([modes.COMMAND_LINE], ['<C-i>'], 'show list', function() {
liberator.eval('completions.complete(true, false); completions.itemList.show();', commandline.input);
});
// ==UserScript==
// @name LDR add B! button
// @namespace http://rails2u.com/
// @include http://reader.livedoor.com/reader/*
// @version 0.1
// ==/UserScript==
(function(){
var w = (typeof unsafeWindow == 'undefined') ? window : unsafeWindow;
w.entry_widgets.add('hb_add', function(feed){
100000 get!!!
 ̄ ̄ ̄ ̄∨ ̄ ̄ ̄ ̄ ̄ (´
∧∧ ) (´⌒(´
⊂(゚Д゚⊂⌒`つ≡≡≡(´⌒;;;≡≡≡
" ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ (´⌒(´⌒;;
ズザーーーーーッ
<html>
<head>
<script charset="utf-8" type="text/javascript">
function write(str) {
document.getElementById('test').appendChild(document.createTextNode(str + "\n"));
}
window.addEventListener('load', function () { write('[onload]'); }, false);
window.addEventListener('DOMContentLoaded', function () { write('[DOMContentLoaded]'); }, false);
</script>
</head>