Skip to content

Instantly share code, notes, and snippets.

View tomorrowkey's full-sized avatar
🍺
cheers!

Tomoki Yamashita tomorrowkey

🍺
cheers!
View GitHub Profile
general:
branches:
only: 'master'
artifacts:
- 'build/libs'
machine:
java:
version: openjdk7
test:
override:
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {

Take android screenshot from terminal.
Write it on your .bashrc or .zshrc whatever.

alias screenshot='adb_peco.sh screenshot2 $TMPDIR/screenshot.png; open $TMPDIR/screenshot.png'

see also https://github.com/tomorrowkey/adb-peco

@tomorrowkey
tomorrowkey / script.sh
Last active August 29, 2015 14:06
find apk and install it
installapk() {
find ./ -name *.apk | peco | xargs adb install -r
}
@tomorrowkey
tomorrowkey / gist:5126812
Last active December 14, 2015 18:08
Update, the answer will trim.
package jp.tomorrowkey.englishpractice;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
private static ArrayList<Item> itemArray;
@tomorrowkey
tomorrowkey / bookmarklet
Created November 9, 2012 08:16
expand all tree on google site's sitemap
javascript:(function(){var t=document.getElementsByClassName('goog-tree-expand-icon-tplus');var e=document.createEvent('MouseEvents');e.initMouseEvent('mousedown',true,true,window,0,0,0,0,0,false,false,false,false,0,null);while(t.length>0){t[0].dispatchEvent(e);}})()
@tomorrowkey
tomorrowkey / gist:3786118
Created September 26, 2012 04:45
crush closeable
package com.example.android.crushcloseable;
import java.io.Closeable;
import java.io.IOException;
import android.app.Activity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.add(new ConfirmDialogFragment(), "confirmdialog");
ft.commit();