Skip to content

Instantly share code, notes, and snippets.

View st63jun's full-sized avatar

Jun SAITO st63jun

View GitHub Profile
@st63jun
st63jun / delete_personal_document.js
Created October 26, 2012 15:44 — forked from tdtds/delete_personal_document.js
Kindle Personal Documentの一覧に一発削除用の「×」マークを付けるBookmarklet
javascript:jQuery('span.headerStatus').each(function(){var%20e=jQuery(this);e.append(jQuery('<a>').attr('href',e.attr('id').replace(/^Row.*_/,'javascript:Fion.deleteItem("deleteItem_')+'");').text('%C3%97'))});void(0)
@st63jun
st63jun / traverseAndGetFirst.groovy
Created October 11, 2011 00:50 — forked from fumokmm/traverseAndGetFirst.groovy
Groovyでファイルツリーを巡り、最初に見つかったファイルを返却する(見つかったらすぐ返却)
// cf. http://groovy.codehaus.org/groovy-jdk/java/io/File.html#traverse%28java.util.Map,%20groovy.lang.Closure%29
// require Groovy v1.7.1 or upper
// blog. http://d.hatena.ne.jp/fumokmm/20110911/1315709484
def findFirstFile(File rootDir, java.util.regex.Pattern filter) {
File result
rootDir.traverse(
type : groovy.io.FileType.FILES,
nameFilter : filter
) { it -> result = it
groovy.io.FileVisitResult.TERMINATE