Skip to content

Instantly share code, notes, and snippets.

@friederbluemle
friederbluemle / man-du-macos-10.15.4.txt
Last active Apr 4, 2020
`MANWIDTH=100 man du | col -bx` on macOS 10.15.4 (19E266)
View man-du-macos-10.15.4.txt
DU(1) BSD General Commands Manual DU(1)
NAME
du -- display disk usage statistics
SYNOPSIS
du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g] [-x] [-I mask]
[file ...]
@friederbluemle
friederbluemle / man-du-gnu-coreutils-8.32.txt
Created Apr 4, 2020
`MANWIDTH=100 man du | col -bx` on Arch Linux with GNU coreutils 8.32
View man-du-gnu-coreutils-8.32.txt
DU(1) User Commands DU(1)
NAME
du - estimate file space usage
SYNOPSIS
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
DESCRIPTION
@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