Skip to content

Instantly share code, notes, and snippets.

View takahirom's full-sized avatar

Takahiro Menju takahirom

View GitHub Profile
@takahirom
takahirom / diff.patch
Created March 12, 2016 09:37
Support Library 23.2.0 -> 23.2.1 Resource diff
33,34d32
< ./drawable/abc_btn_checkbox_checked_mtrl.xml
< ./drawable/abc_btn_checkbox_unchecked_mtrl.xml
38,39d35
< ./drawable/abc_btn_radio_off_mtrl.xml
< ./drawable/abc_btn_radio_on_mtrl.xml
45,54d40
< ./drawable/abc_ic_ab_back_material.xml
< ./drawable/abc_ic_clear_material.xml
< ./drawable/abc_ic_go_search_api_material.xml
@takahirom
takahirom / aospbrowser.dot
Last active March 19, 2016 13:48
AOSP Browser
digraph hierarchy {
size="5,5"
node[shape=record,style=filled,fillcolor=gray95]
edge[dir=back, arrowtail=empty]
BrowserActivity[label = "{BrowserActivity|...|...}"]
Controller[label = "{Controller|...|...}"]
BaseUi[label = "{BaseUi|UiController mUiController\lTabControl mTabControl\lViews...|...}"]
@takahirom
takahirom / wifi_auto_reconnect.applescript
Last active October 29, 2016 10:08
WiFi Auto reconnecting
repeat
try
do shell script "ping -c 5 google.com"
on error
do shell script "networksetup -setairportpower en0 off"
do shell script "networksetup -setairportpower en0 on"
display notification "reconnecting"
delay 40
try
do shell script "ping -c 5 google.com"
@takahirom
takahirom / mp4togif
Created March 29, 2015 10:30
mp4 to gif
mkdir work_for_gif
ffmpeg -i $1 -an -r 15 -s `ffmpeg -i $1 2>&1 | perl -lane 'print $1 if /(\d{2,}x\d+)/'` work_for_gif/%04d.png
convert work_for_gif/*.png output.gif
rm -rf work_for_gif
@takahirom
takahirom / RecycleViewMatcher.java
Created June 3, 2017 08:23 — forked from baconpat/RecycleViewMatcher.java
RecycleViewMatcher (updated for scrolling)
package com.foo.RecyclerViewMatcher;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@takahirom
takahirom / .diff
Created March 27, 2018 12:19
medium 3.1 diff:build.gradle
- classpath ‘com.android.tools.build:gradle:3.0.1’
+ classpath ‘com.android.tools.build:gradle:3.1.0’
@takahirom
takahirom / .diff
Created March 27, 2018 12:34
Created with Copy to Gist
-!.idea/codeStyleSettings.xml
+!.idea/codeStyles/*
@takahirom
takahirom / codeStyleConfig.xml
Last active March 27, 2018 12:36
Created with Copy to Gist
<component name=”ProjectCodeStyleConfiguration”>
 <state>
 <option name=”USE_PER_PROJECT_SETTINGS” value=”true” />
 </state>
</component>
@takahirom
takahirom / Project.xml
Last active March 27, 2018 12:37
Created with Copy to Gist
<component name=”ProjectCodeStyleConfiguration”>
 <code_scheme name=”Project” version=”173">
 <option name=”USE_SAME_INDENTS” value=”true” />
@takahirom
takahirom / NonNullObservableField.kt
Last active March 28, 2018 07:57
NonNullObservableField for AGP 3.1 DataBinding and Kotlin
import android.databinding.ObservableField
class NonNullObservableField<T : Any>(value: T) : ObservableField<T>(value) {
override fun get(): T {
return super.get() as T
}
}