Skip to content

Instantly share code, notes, and snippets.

View stefanhoth's full-sized avatar
:shipit:
Shipping it

Stefan Hoth stefanhoth

:shipit:
Shipping it
View GitHub Profile
@stefanhoth
stefanhoth / build.gradle
Created June 11, 2014 06:56
AndroidDev / gradle: How to rename your output apk during build time to include details like the version.
android {
// .. set up build flavors etc here
//instead of "app-release.apk" this method will rewrite the name to
// "MyCoolCompany-MyGreatProduct-v<defaultConfig.versionName>-RELEASE.apk which is much better suited for archiving and overall handling
// To restore the default behavior just delete the whole block below
applicationVariants.all { variant ->
def apk = variant.outputFile;
@stefanhoth
stefanhoth / android-libs.md
Last active April 18, 2020 05:02
GDG Android in Berlin brainstorming session Collection of libraries that should be included as of today in a modern Android app-

#GDG Android in Berlin brainstorming session


On November 27, 2013 I was asking the brilliant Android developers at GDG Android in Berlin for their favorite libraries that make their lives easier and should be included in every newly developed app.

This is the list of libraries we collected during this 10 minute session.

Architecture

@stefanhoth
stefanhoth / build.gradle
Last active March 3, 2017 12:03
Simple plugin for build.gradle to instruct Jetbrains IDEA-based IDEs (IntelliJ, Android Studio) to download sources of the dependencies. More settings can be found here: http://gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html
// your code
apply from: "build-plugins/idea-gradle-sources.gradle"
SDK_HOME_PATH="$HOME"
SDK_PATH="$SDK_HOME_PATH/android-sdk-linux"
# Needs to be updated when new releases are made
SDK_DOWNLOAD_URL="http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz"
curl --location $SDK_DOWNLOAD_URL | tar -xz -C $SDK_HOME_PATH
# Just install platform-tools, build-tools & Android-19
# Filter names are from `android list sdk -e -a`
@stefanhoth
stefanhoth / check_http_echo_body.sh
Last active December 29, 2015 13:29
nagios check for parsing the body of the http response for a detailed message
#!/bin/bash
#check input parameters
if [ -z $1 ]; then
echo "Usage: $0 <url>"
exit 3
fi
#url to check
checkurl=$1
@stefanhoth
stefanhoth / Gruntfile.js
Created November 6, 2013 19:55
Grunt buildfile with angular: livereload, cssmin, jsmin all in one
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
js: {
src: [
'app/bower_components/angular/angular.js',
/*
* Mass Emailer Google Spreadsheet and Forms Script.
*
* Changelog:
*
* 30. Apr. 2013
* - add support for Form submit auto-replies
* 27. Apr. 2013
* - trial checkbox allows easier debugging
* 16. Feb. 2012
@stefanhoth
stefanhoth / LICENSE
Last active October 24, 2015 17:42
Rock Paper Scissors Lizard Spock - Android VectorDrawable definitions based on https://commons.wikimedia.org/wiki/File:Pierre_ciseaux_feuille_l%C3%A9zard_spock_aligned.svg
http://creativecommons.org/licenses/by-sa/4.0/
Creative Commons Attribution-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 – Definitions.
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licen
@stefanhoth
stefanhoth / build.gradle
Created December 3, 2012 18:24
A buildfile for the Gradle build system for Android
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.2'
}
}
@stefanhoth
stefanhoth / gist:3749214
Created September 19, 2012 11:38 — forked from gnunicorn/gist:3748738
Git for Beginners: Call for Coaches

The OpenTechSchool has set up and hosted a few tech workshops and meetups here in Berlin now. Aside from the monthly Beginners Meetup and hosting the Udacity Global Meetup we hosted workshops for program beginners in Python and Javascript on our own and on the premise of CampusParty.

One thing that was extraordinary popular on CampusParty was the Workshop on Git for beginners. And we decided to do it again, this time with a closer focus on version control as a major benefit in code sharing (by using git and github) for beginners - free of charge.

So if you are interested in