Skip to content

Instantly share code, notes, and snippets.

View AntonKosov's full-sized avatar

Anton Kosov AntonKosov

View GitHub Profile
@AntonKosov
AntonKosov / makefile
Last active January 6, 2024 14:32
Managing Docker Compose Services
run:
@ls -1 -d */ | xargs -i sh -c 'cd {} && docker compose up -d'
stop:
@ls -1 -d */ | xargs -i sh -c 'cd {} && docker compose stop'
# GPG_TTY must be defined: GPG_TTY=$(tty) make backup
backup:
@$(MAKE) stop
@sudo tar -zcf - * | gpg --symmetric --cipher-algo aes256 -o backup-`date +%y-%m-%d`.tar.gz.gpg
@AntonKosov
AntonKosov / build.gradle
Last active December 11, 2018 16:17
[Gradle] Downloading packages from maven repositories
// Run "gradle copyLibs"
// https://dl.google.com/dl/android/maven2/index.html
apply plugin: 'java'
repositories {
mavenLocal()
mavenCentral()
maven { url "https://maven.google.com" }
}
@AntonKosov
AntonKosov / build.gradle
Last active January 6, 2018 16:55
android + gradle + idea + git + private keystore
// Tags:
// Version name: ignore leading non-digits and everything after the first underscore
// Version code: take digits after the first underscore
// e.g. tag xxx1.2.3.foo-bar_15_baz will yield versionName 1.2.3.foo-bar and versionCode 15
// Output filename:
// <project name>-<release|debug>-<version (from last tag)|"dev" (doesn't have tag)>[-NOTRELEASE (exist changes after last tag)]-<last short commit hash>[-dirty (exist changes)].apk
// Sample:
// myproject-debug-dev-094cf50.apk
// myproject-debug-0.1.0-094cf50.apk