Instantly share code, notes, and snippets.

View gist:844a5c8f5cf7435bf9a908ee35242610
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;
}
View gist:9425626
# -*- 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
View gist:6713946
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 1段目
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
VKF4::Send,{``} ; 半角/全角 -> `
+VKF4::Send,{~} ; Shift + 半角/全角 -> ~
; なんかよくわからないけどこうしたらうまくった
vkF4sc029::Send {``}
+vkF4sc029::Send {~}
vkF3sc029::Send {``}
+vkF3sc029::Send {~}
View gist:6577089
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;
View gist:6484849
; 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}
View xls_printer.rb
#! ruby -Ks
require 'win32ole'
# usage
# ruby xls_printer.rb (対象ディレクトリ:省略時はカレントディレクトリを対象にする)
module DirectoryDigger
def getAbsolutePath(filename)
@fso = WIN32OLE.new('Scripting.FileSystemObject')
return @fso.GetAbsolutePathName(filename)
We couldn’t find that file to show.