Skip to content

Instantly share code, notes, and snippets.

@Sunitha
Sunitha / how to get active ie window object
Created December 13, 2010 16:19
how to get active IE object
We couldn’t find that file to show.
@Sunitha
Sunitha / xls_printer.rb
Created January 31, 2011 23:26
Print all Excel files
#! ruby -Ks
require 'win32ole'
# usage
# ruby xls_printer.rb (対象ディレクトリ:省略時はカレントディレクトリを対象にする)
module DirectoryDigger
def getAbsolutePath(filename)
@fso = WIN32OLE.new('Scripting.FileSystemObject')
return @fso.GetAbsolutePathName(filename)
@Sunitha
Sunitha / gist:6484849
Last active December 22, 2015 14:19
an autohotokey script to operate your windows vim-likely.
; vim-like key-bind
vk20sc039 & h:: Send, {Left}
vk20sc039 & l:: Send, {Right}
vk20sc039 & k:: Send, {Up}
vk20sc039 & j:: Send, {Down}
vk20sc039 & z:: Send, #d
vk20sc039 & vk20sc039 :: Send, {Space}
vk20sc039 & i:: Send, {F2}{Home}
vk20sc039 & a:: Send, {F2}{End}
vk20sc039 & y:: Send, ^{c}
@Sunitha
Sunitha / gist:6577089
Last active December 23, 2015 03:59
configuration to add command to open a url in a background tab on vimperator vimperatorでバックグラウンドタブでurlを開くコマンドを追加
javascript <<EOM
commands.add(["backgroundtabopen", "bt[open]", "btabnew"],
"Open one or more URLs in a new background tab",
function (args) {
let index = tabs.getTab();
let special = args.bang;
args = args.string;
if (options.get("activate").has("all", "tabopen"))
special = !special;
@Sunitha
Sunitha / gist:6713946
Created September 26, 2013 13:11
@todeskingさんのautohotkeyの半角/全角キーの扱いを変更。 本家はこっち=>http://d.hatena.ne.jp/gnarl/20090429/1240996300
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 1段目
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
VKF4::Send,{``} ; 半角/全角 -> `
+VKF4::Send,{~} ; Shift + 半角/全角 -> ~
; なんかよくわからないけどこうしたらうまくった
vkF4sc029::Send {``}
+vkF4sc029::Send {~}
vkF3sc029::Send {``}
+vkF3sc029::Send {~}
@Sunitha
Sunitha / gist:9425626
Last active August 29, 2015 13:57
Userscript server for IE in stead Trixie or IE7pro.
# -*- coding: utf-8 -*-
require "win32ole"
require "rkelly"
require "kconv"
# put the directory that you please.
# if not, the directory where the script is will be searched for as it looks.
USER_SCRIPT_DIR = ""
class UserScriptRunner
@Sunitha
Sunitha / gist:844a5c8f5cf7435bf9a908ee35242610
Created October 27, 2016 14:11
a userscript to navigate to another URL which has a better text on amazon.co.jp
var href = location.href;
var mt = href.match(/https:\/\/twitter.com\/intent\/tweet?.*.text=(.*).related=.url=(.*).via=/);
if (mt) {
var text = mt[1];
var url = mt[2];
var new_url = "https://twitter.com/intent/tweet?.*&text=" + text + "&url=" + url;
location.href = new_url;
}