Skip to content

Instantly share code, notes, and snippets.

Avatar

Carsten Hagemann carstenhag

View GitHub Profile
@carstenhag
carstenhag / profiling.scenarios
Last active Mar 15, 2021
Profiling/Benchmarking scenarios to get started with the grade-profiler tool. See article at https://www.maibornwolff.de/en/blog/benchmarking-android-java-kotlin-builds-gradle-profiler
View profiling.scenarios
incremental_resource_change {
tasks = ["assembleBrandRedEnvIntegrationDebug"]
warm-ups: 1
iterations: 3
apply-android-resource-change-to = ["app/src/main/res/values/strings.xml"]
}
incremental_layout_change {
tasks = ["assembleBrandRedEnvIntegrationDebug"]
View manifest-excerpt.xml
<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
tools:node="replace">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
View badging.txt
package: name='com.example.resourcesresolutionbug.red' versionCode='1' versionName='1.0' platformBuildVersionName='' platformBuildVersionCode='' compileSdkVersion='29' compileSdkVersionCodename='10'
sdkVersion:'21'
targetSdkVersion:'29'
application-label:'Resources Resolution Bug'
application-label-af:'Resources Resolution Bug'
application-label-am:'Resources Resolution Bug'
application-label-ar:'Resources Resolution Bug'
application-label-as:'Resources Resolution Bug'
application-label-az:'Resources Resolution Bug'
application-label-be:'Resources Resolution Bug'
@carstenhag
carstenhag / massdeletion.js
Created Mar 9, 2020
Script to automatically delete all releases of an AppCenter app.
View massdeletion.js
setInterval(. function() {
document.querySelector('[data-test-id="release-delete-menu-item"]').click();
document.querySelector('[data-test-id="confirm-button"]').click();
}, 500)
@carstenhag
carstenhag / zeplin-export.js
Last active May 18, 2021
Export zeplin SVG assets. Open the styleguide site on the zeplin website, run the script in your console, and then make sure to click each asset every second.
View zeplin-export.js
function refreshData()
{
let index = 1 // On AND, the SVG download button is the second, so we need [1]. On iOS, the PDFs are also at [1]. See https://i.imgur.com/hoWIniV.png.
document.getElementsByClassName("downloadButton")[index].click()
setTimeout(refreshData, 1000);
}
refreshData(); // execute function
View log.txt
D:\Downloads2019\wildfly-16.0.0.Final\bin\standalone.bat
"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" -Dfile.encoding=windows-1252 -classpath C:\Users\carst\AppData\Local\Temp\classpath1185450043.jar com.intellij.javaee.oss.process.JavaeeProcess 49268 com.intellij.javaee.oss.jboss.agent.WildFly11Agent
[2019-06-26 09:39:17,816] Artifact todo:war: Waiting for server connection to start artifact deployment...
Detected server admin port: 9990
Detected server http port: 8080
Calling "D:\Downloads2019\wildfly-16.0.0.Final\bin\standalone.conf.bat"
Setting JAVA property to "C:\Program Files\Java\jdk-11.0.1\bin\java"
===============================================================================
JBoss Bootstrap Environment
View gist:3d4b1afca957f938b1655129abdb921f
package de.chagemann.timetracking.features.nfcReaction
import android.app.Application
import android.content.Intent
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.Transformations
import de.chagemann.timetracking.db.Project
import de.chagemann.timetracking.db.TimeRepository
import de.chagemann.timetracking.db.TrackingInterval
import de.chagemann.timetracking.features.nfcMapping.NFCUtils
View manual-query-and-osmtogeojson.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Sidebar-shortened.vue
<template lang="pug">
b-button(v-if="!newProjectFormVisible" variant="secondary" @click="showNewProjectForm()") Projekt Hinzufügen
form.new-project-form(v-else)
input(v-model="newProjectName" type="text" maxlength="20" required)
b-button(variant="primary" @click="createNewProject()") Projekt Hinzufügen
b-button(variant="tertiary" @click="abortNewProject()") Abbrechen
</template>
<script lang="ts">
View overpassqueries.ql
[timeout:3600];
( area["ISO3166-1:alpha3"="DEU"];) ->.a;
node["amenity"="parking"]
(area.a);
(._;>;);
out body;
Only returns post_office amenities