Skip to content

Instantly share code, notes, and snippets.

View tomorrowkey's full-sized avatar
🍺
cheers!

Tomoki Yamashita tomorrowkey

🍺
cheers!
View GitHub Profile
@nolanlawson
nolanlawson / completion-for-gradle.md
Last active September 25, 2024 12:51
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
@sys1yagi
sys1yagi / bookmarklet
Created November 9, 2012 09:42 — forked from tomorrowkey/bookmarklet
expand all tree on google site's sitemap. auto!
javascript:(function(){var t = 1000;var r = 3;var s = function(k){return document.getElementsByClassName('goog-tree-expand-icon-'+k);};var d = function(p){var e=document.createEvent('MouseEvents');e.initMouseEvent('mousedown',true,true,window,0,0,0,0,0,false,false,false,false,0,null);while(p.length>0){p[0].dispatchEvent(e);}};var c = function(){var p=s("tplus");var ps = p.length;d(p);var l=s("lplus");var ls = l.length;d(l);if(r>0){if(ps + ls == 0){console.log("retry");r--;}setTimeout(function(){c();}, t);}};c();})();
@shisashi
shisashi / LongClickRepeatAdapter.java
Created February 1, 2012 19:03
AndroidのViewに、長押ししたらクリック処理をリピートする処理を付加するアダプタ
package net.shisashi.android.widget;
import android.os.Handler;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.view.View.OnTouchListener;
public class LongClickRepeatAdapter {