Skip to content

Instantly share code, notes, and snippets.

JP proverbface

View GitHub Profile
@corse32
corse32 / zip.js
Created Mar 23, 2018
Variable Arity Array Zip
View zip.js
function zip() {
const [arr1, ...rest] = arguments
return arr1.map((e, i) => [e, ...rest.reduce((accum, arrN) => [...accum, arrN[i]], [])])
}
View build.gradle
def buildConfigAndResStringField(variant, name, value) {
variant.resValue 'string', name.toLowerCase(), value
variant.buildConfigField 'String', name, "\"$value\""
}
afterEvaluate {
android.applicationVariants.all { variant ->
variant.resValue 'string', 'application_id', variant.applicationId
buildConfigAndResStringField variant, "ACCOUNT_TYPE", variant.applicationId
buildConfigAndResStringField variant, "CONTENT_AUTHORITY", variant.applicationId + ".provider"
You can’t perform that action at this time.