Skip to content

Instantly share code, notes, and snippets.

View hjhjw1991's full-sized avatar
🛴

hjhjw1991 hjhjw1991

🛴
View GitHub Profile
@goodev
goodev / AndroidLogKotlin.xml
Last active November 1, 2021 07:29
Android log live template for kotlin:
<templateSet group="AndroidLogKotlin">
<template name="logm" value="android.util.Log.d(TAG, $FORMAT$)" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true">
<variable name="FORMAT" expression="groovyScript(&quot;def params = _2.collect {it + ' = [$' + it + ']'}.join(', '); return '\&quot;' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\&quot;'&quot;, kotlinFunctionName(), functionParameters())" defaultValue="" alwaysStopAt="false" />
<context>
<option name="KOTLIN_STATEMENT" value="true" />
</context>
</template>
<template name="logd" value="android.util.Log.d(TAG, &quot;$METHOD_NAME$: $content$&quot;)" description="Log.d(String)" toReformat="true" toShortenFQNames="true">
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" />
<variable name="content" expression="" defaultValue="" alwaysStopAt="true" />
@ultraon
ultraon / build.gradle
Last active August 19, 2020 18:10
Good example of the merged Jacoco code covarage Gradle configuration
apply plugin: 'com.android.application'
apply from: "$rootDir/coverage.gradle"
//...
android {
//...
buildTypes {
//...
debug {
@rednaxelafx
rednaxelafx / log1
Created July 14, 2011 03:49
analyzing an endless loop problem caused by concurrent access to HashMap.get()
$ top -H
...
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19115 root 25 0 576m 217m 9432 R 99.7 5.3 1357:12 java
28347 root 25 0 576m 217m 9432 R 99.7 5.3 1191:05 java
26912 root 25 0 576m 217m 9432 R 99.3 5.3 114:58.57 java
5607 root 25 0 576m 217m 9432 R 99.0 5.3 54:49.02 java