Skip to content

Instantly share code, notes, and snippets.

View vmi's full-sized avatar
😣
I may be slow to respond.

Motonori IWAMURO vmi

😣
I may be slow to respond.
View GitHub Profile
@vmi
vmi / kill_gyosha.user.js
Created November 3, 2010 01:36
This is Firefox GreaseMonkey script, kill articles posted by f*cking gyosha.
// ==UserScript==
// @name kill_gyosha
// @namespace arcadia
// @description Kill articles posted by gyosha.
// @include http://www.mai-net.net/bbs/*
// @include http://mai-net.ath.cx/bbs/*
// ==/UserScript==
(function() {
// 業者が増えたらここをカスタマイズしてください
@vmi
vmi / arcadia-reader.user.js
Created November 13, 2010 09:59
Utilities for Arcadia
// ==UserScript==
// @name arcadia-reader
// @namespace arcadia
// @description Utilities for Arcadia
// @include http://www.mai-net.net/bbs/*
// @include http://mai-net.ath.cx/bbs/*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_listValues
@vmi
vmi / gist:1381457
Created November 21, 2011 02:44
[snippet] rsync options
### useful rsync options
# not keep owner & group
# -v: verbose
# -r: recursive
# -t: keep mtime
# -O: don't keep directory's mtime (with -t)
# -c: checksum base comparison (default: mtime & size)
# --delete-after: delete files which are not in SOURCE from DESTINATION
rsync -v -r -t -O -c --delete-after SOURCE DESTINATION
@vmi
vmi / gist:1470974
Created December 13, 2011 06:55
[snippet] WIN32OLE Word (ruby)
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
require 'win32ole'
WIN32OLE.codepage = WIN32OLE::CP_UTF8
$fso = WIN32OLE.new('Scripting.FileSystemObject')
$wd = WIN32OLE.new('Word.Application')
@vmi
vmi / gist:1470977
Created December 13, 2011 06:56
[snippet] WIN32OLE Excel (ruby)
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
require 'win32ole'
WIN32OLE.codepage = WIN32OLE::CP_UTF8
$fso = WIN32OLE.new('Scripting.FileSystemObject')
$xl = WIN32OLE.new('Excel.Application')
@vmi
vmi / xpash.rb
Created January 6, 2012 10:08
xpash - Interactive XPath Shell
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
#
# xpash - Interactive XPath Shell
require 'readline'
require 'rexml/document'
include REXML
@vmi
vmi / gist:1619636
Created January 16, 2012 07:37
Get google closure compiler
#!/bin/bash
if [ -f compiler-latest.zip ]; then
read -p 'Re-get archive?(y/N) ' yn
case "$yn" in
y|Y|yes)
;;
*)
echo "Abort."
exit 1
@vmi
vmi / utf8length.js
Created January 18, 2012 14:29
Calulate byte length of string as UTF-8.
/*
* Fair License (Fair)
*
* Copyright (c) 2012, IWAMURO Motonori
*
* Usage of the works is permitted provided that this instrument is
* retained with the works, so that any entity that uses the works is
* notified of this instrument.
*
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
@vmi
vmi / string-format.js
Created January 19, 2012 01:40
simple string format utilities
/*
* Fair License (Fair)
*
* Copyright (c) 2012, IWAMURO Motonori
*
* Usage of the works is permitted provided that this instrument is
* retained with the works, so that any entity that uses the works is
* notified of this instrument.
*
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
@vmi
vmi / repeater.js
Created January 19, 2012 06:54
Repeat function with named item
/*
* Fair License (Fair)
*
* Copyright (c) 2012, IWAMURO Motonori
*
* Usage of the works is permitted provided that this instrument is
* retained with the works, so that any entity that uses the works is
* notified of this instrument.
*
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.