Skip to content

Instantly share code, notes, and snippets.

Frieder Bluemle friederbluemle

Block or report user

Report or block friederbluemle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@friederbluemle
friederbluemle / build.gradle
Created Jan 17, 2020
Simple minimal Android Gradle <-> Git tag version mapping
View build.gradle
android {
// ...
defaultConfig {
def gitDescribe = "git -C ${rootDir} describe --tags --long --dirty".execute().text.trim()
def (tag, commitsString, commitSha, dirty) = gitDescribe ? gitDescribe.tokenize('-') : []
def (tagMajor, tagMinor, tagPatch) = tag ? tag.tokenize('.') : []
def commits = commitsString ? commitsString.toInteger() : 0
def tmpMajor = tagMajor ? tagMajor.replaceAll('^v', '') : ''
def major = (tmpMajor && tmpMajor.isNumber()) ? tmpMajor.toInteger() : 0
def minor = (tagMinor && tagMinor.isNumber()) ? tagMinor.toInteger() : 0
View gist:3b568e01aaa83de7f504873d309f906a
Verifying my Blockstack ID is secured with the address 1ESjwWJe3QbFWTuqPWRXChH4DvHa2h3Tf4 https://explorer.blockstack.org/address/1ESjwWJe3QbFWTuqPWRXChH4DvHa2h3Tf4
View keybase.md

Keybase proof

I hereby claim:

  • I am friederbluemle on github.
  • I am friederbluemle (https://keybase.io/friederbluemle) on keybase.
  • I have a public key ASAivIza2aMl4EHXW2pXE7TSHIghuS3AghQWN8WLqtKSPQo

To claim this, I am signing this object:

View gcmtest.js
var request = require('request');
var apiKey = "API_KEY";
var regId = "REG_ID";
var args = process.argv.slice(2);
if (args[0] == 'show_offers') {
var data = {
id: Math.floor(Date.now() / 1000),
@friederbluemle
friederbluemle / gist:0e15718dd84b5d34400c
Created Aug 8, 2014
Gradle versioning using Git tags
View gist:0e15718dd84b5d34400c
def getGitDescribe = { ->
return 'git describe --tags --dirty'.execute().text.trim()
}
def isSnapshotBuild = { ->
def hasModifiedDeletedOrOtherFiles = !'git ls-files -mdo --exclude-standard'.execute().text.trim().isEmpty()
def hasStagedFiles = !'git diff-index --no-ext-diff --name-only --cached HEAD'.execute().text.trim().isEmpty()
def hasAdditionalCommits = getGitDescribe().contains('-')
hasModifiedDeletedOrOtherFiles || hasStagedFiles || hasAdditionalCommits
}
@friederbluemle
friederbluemle / gist:25821a42a2eab20562b7
Created Jul 29, 2014
Manually add dependencies to pom.xml when using maven-publish plugin
View gist:25821a42a2eab20562b7
publishing {
publications {
maven(MavenPublication) {
// ...
// Manually add dependencies to pom until maven-publish knows how to do it
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
You can’t perform that action at this time.