Skip to content

Instantly share code, notes, and snippets.

View tmiyamon's full-sized avatar

Takuya Miyamoto tmiyamon

View GitHub Profile
@tmiyamon
tmiyamon / getapk.sh
Created January 2, 2018 13:47
Get apk from device and decompile it
#/bin/sh
APK_PACAKGE=$(adb shell pm list packages | peco | cut -d ':' -f 2)
mkdir -p $APK_PACAKGE
cd $APK_PACAKGE
APK_PATH=$(echo $APK_PACAKGE | xargs adb shell pm path | cut -d ':' -f 2 | tr '\r' ' ' )
echo $APK_PATH | xargs adb pull
APK=$(echo $APK_PATH | awk -F / '{print $NF}')
@tmiyamon
tmiyamon / debug_net_http.rb
Created July 15, 2017 18:31
debug net http in ruby
require 'net/http'
class Net::HTTP
alias :create :initialize
def initialize(*args)
create(*args)
self.set_debug_output $stderr
$stderr.sync = true
end
@tmiyamon
tmiyamon / build.gradle
Last active January 5, 2017 15:44
Enable groovy for unit test of android project with other jvm language in gradle
dependencies {
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
testCompile "cglib:cglib-nodep:3.1"
testCompile "org.objenesis:objenesis:2.1"
}
android.applicationVariants.all {
def variantName = it.name
def capitalizedName = "${variantName[0].toUpperCase()}${variantName[1..-1]}"
@tmiyamon
tmiyamon / custom-list.scss
Created August 31, 2015 09:59
scss adjusted custom style list
@mixin custom-list($type) {
$padding: 10px;
$width: 100px;
list-style-type: none;
& > li {
counter-increment: $type;
position: relative;
@tmiyamon
tmiyamon / gist:6138336
Last active December 20, 2015 13:19
hard corded switch to choose region name as a method.
if (country_code.equals("JP") == true) {
switch (region_code2) {
case 1:
name = "Aichi";
break;
case 2:
name = "Akita";
break;
case 3:
name = "Aomori";