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
#!/bin/sh
#
# chkconfig: - 80 20
# description: tomcat
# merged scripts on following pages:
# http://www.atmarkit.co.jp/ait/articles/0710/11/news121_2.html
# http://d.hatena.ne.jp/marmotte/20110910/1315660564
# Source function library.
@vmi
vmi / list-accounts.sql
Created March 21, 2013 02:09
MySQL listing accounts
SELECT concat(User, '@', Host) User, Password FROM mysql.user order by host, user;
SELECT * FROM information_schema.schema_privileges order by table_schema, grantee, privilege_type;
SELECT * FROM information_schema.table_privileges order by table_schema, grantee, table_name, privilege_type;
@echo off
set P=%0
ruby -S -x %P:\=/% %*
goto end
#! ruby
# -*- coding: Windows-31J -*-
$stdout.set_encoding('UTF-8', 'Windows-31J')
$stderr.set_encoding('UTF-8', 'Windows-31J')
puts "てすと"
__END__
@vmi
vmi / gist:3652064
Created September 6, 2012 06:22
Excel: 計算式で指定した位置のセル値を取得
=INDIRECT("R"&(expr)&"C"&(expr), FALSE)
@vmi
vmi / gist:3615437
Created September 4, 2012 01:04
Maven tips
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
@vmi
vmi / gist:3375490
Created August 17, 2012 02:48
tar ⇔ cpio
tar cf FILE ⇔ cpio -oF FILE
tar tf FILE ⇔ cpio -tF FILE
tar xf FILE ⇔ cpio -iF FILE
@vmi
vmi / gist:3008607
Created June 28, 2012 03:04
change buffer name for chef
;;; Chef's cookbooks has too many "default.rb".
;;; This hook is for detecting each "default.rb".
(defun chef-rename-buffer ()
(let ((fn (buffer-file-name)))
(and (stringp fn)
(string-match "/cookbooks/\\(.+\\)" fn)
(rename-buffer (match-string 1 fn) t))))
(add-hook 'find-file-hook
@vmi
vmi / gist:2765873
Created May 22, 2012 01:13
list of xmllint xpath functions
xmllint --format http://xmlsoft.org/html/libxml-xpathInternals.html | perl -nle '/Function: xmlXPath(\w+)Function</ && print lcfirst $1'
boolean
ceiling
concat
contains
count
false
floor
id
@vmi
vmi / eclipse-plugins.txt
Last active August 9, 2017 02:41
Eclipseプラグイン選択メモ
Required
- BuildShip
- AnyEditTools
- Lombok (run downloaded "lombok.jar" to start installer)
Optional
- CheckStyle
- FindBugs
???
@vmi
vmi / gist:2048811
Created March 16, 2012 06:45
JavaScript XPath メモ
// XPath メモ
// 使用例
var xpathResult = document.evaluate("XPath式", document.body, null, 9, null);
// var xpathResult = document.evaluate(
// xpathExpression,
// contextNode,
// namespaceResolver,
// resultType,