View settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include(":app", ":router", ":router-annotation", ":router-compiler", ":download", ":app-installer", ":app-packages") | |
project(":download").projectDir = File("../download/download") | |
project(":app-installer").projectDir = File("../app-installer/app-installer") | |
project(":app-packages").projectDir = File("../app-packages/app-packages") |
View gist:564a2ea910e3f5afb43f7075ac1c6218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
originParams='"hello world"' | |
originParamsFormatted=`echo ${originParams//'"'/'\"'}` # 输出结果 \"hello world\" |
View monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 如果需要监控指定命令的执行结果,失败时自动发邮件,就只需在最前面用此命令执行即可,例如 monitor echo "hello world" | |
# 得到当前脚本文件所在的绝对路径 | |
basePath=$(cd `dirname $0`; pwd) | |
# 执行并记录状态码 | |
# 如果原本参数里有双引号或单引号的话,直接执行 '$@',会失败 | |
# 用 echo "$@" 打印后看不到原本的双引号或单引号,例如 hive -e "select * from test" 就会变成 hive -e select * from test |
View gist:c11a91b3b996e9c18b0a242e52bdc9c3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basePath=$(cd `dirname $0`; pwd) |
View gist:eb32175e1a1fb94276037a2cabaf2da1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startTimeFormatted=`date '+%Y-%m-%d %a %H:%M:%S'` |
View gist:652fab17869b6c332f2b7cdcc3bed968
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startTime=$[$(date +%s%N)/1000000] |
View time_format.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usedTimeHourFormatted="`awk 'BEGIN{printf "%.1f\n",('${endTime}'-'${startTime}')/'3600000'}'`小时" |
View ActivityEventRegistrar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.panpf.event | |
import android.annotation.TargetApi | |
import android.app.Activity | |
import android.app.Application | |
import android.os.Build | |
import android.os.Bundle | |
import android.support.annotation.RequiresApi | |
import android.support.v4.app.FragmentActivity | |
import android.view.View |
View ArgsBinder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("unused") | |
package me.panpf.args.ktx | |
import android.app.Activity | |
import android.os.Build | |
import android.os.Bundle | |
import android.os.IBinder | |
import android.os.Parcelable | |
import android.support.annotation.RequiresApi |
View ViewModelBinder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("RedundantVisibilityModifier") | |
package me.panpf.arch.ktx | |
import android.arch.lifecycle.ViewModel | |
import android.arch.lifecycle.ViewModelProviders | |
import android.support.v4.app.Fragment | |
import android.support.v4.app.FragmentActivity | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KClass |
NewerOlder