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 / ivysettings.xml
Created January 28, 2012 08:22
Share maven2 cache for ivy
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
<settings defaultResolver="default" />
<property name="m2.dir" value="${user.home}/.m2/repository" />
<property name="m2.pattern" value="[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" />
<resolvers>
<filesystem name="local" m2compatible="true">
<artifact pattern="${m2.dir}/${m2.pattern}" />
<ivy pattern="${m2.dir}/${m2.pattern}" />
@vmi
vmi / gist:1720443
Created February 2, 2012 00:38
3 digit comma grouping regex
s/\B(?=(?:\d{3})+$)/,/g
@vmi
vmi / gist:1984503
Created March 6, 2012 07:07
show hatena bookmark
javascript:(function(){function u(e){return document.evaluate(e,document.head,null,2,null).stringValue}open("http://b.hatena.ne.jp/entry?mode=more&url="+encodeURIComponent(u("link[@rel='canonical']/@href")||u("//meta[@property='og:url']/@content")||location.href),"_blank")})()
@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,
@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: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 / 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: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:3615437
Created September 4, 2012 01:04
Maven tips
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
@vmi
vmi / gist:3652064
Created September 6, 2012 06:22
Excel: 計算式で指定した位置のセル値を取得
=INDIRECT("R"&(expr)&"C"&(expr), FALSE)