This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to create a release commit. | |
# | |
# Increases the version name and version code of an Android app, | |
# commits and tags the result. | |
# | |
# Based of semantic versioning: MAJOR.MINOR.PATCH | |
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api( | |
userAgent: String, | |
val apiKey: String | |
) { | |
val client = HttpClient { | |
install(JsonFeature) { | |
serializer = KotlinxSerializer(Json.nonstrict) | |
} | |
install(Logging) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
image: saschpe/android-sdk:29_29.0.2 | |
stages: | |
- prepare | |
- build | |
- test | |
- integration | |
- release | |
- deploy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to publish apps to the Play Store in case a release is discovered | |
# | |
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
. "${SCRIPT_DIR}/../inc.functions.sh" | |
# Constants | |
SECRET_FILE=config/play-publishing-api.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package saschpe.feel.free.to.copy | |
/** | |
* Wraps any computational result with compile-time type safety | |
* | |
* Suitable to catch and deliver exceptions across thread and process | |
* boundaries (e.g. when an exception happened on a networking thread and needs | |
* to be delivered to the UI thread). Works perfectly with coroutines. | |
* | |
* Very similar to [kotlin.Result] but as a sealed class (with it's benefits). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Copyright 2019 Sascha Peilicke <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.SharedPreferences | |
import android.os.Bundle | |
import android.os.Parcel | |
inline fun <reified T : Enum<T>> Bundle.getEnum(key: String, default: T) = | |
getInt(key).let { if (it >= 0) enumValues<T>()[it] else default } | |
fun <T : Enum<T>> Bundle.putEnum(key: String, value: T?) = | |
putInt(key, value?.ordinal ?: -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package saschpe.alphaplus.utils | |
import android.os.Bundle | |
inline fun <reified T : Enum<T>> Bundle.getEnum(key: String, default: T) = | |
getInt(key).let { if (it >= 0) enumValues<T>()[it] else default } | |
fun <T : Enum<T>> Bundle.putEnum(key: String, value: T?) = | |
putInt(key, value?.ordinal ?: -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CodeMirror HTML Textareas | |
// @namespace saschpe | |
// @description Instanciate a CodeMirror HTML editor for every textarea... | |
// @author Sascha Peilicke <[email protected]> | |
// @include example.com | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/codemirror/4.7.0/codemirror.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/codemirror/4.7.0/mode/css/css.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/codemirror/4.7.0/mode/javascript/javascript.min.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/crowbar_framework/app/models/service_object.rb b/crowbar_framework/app/models/service_object.rb | |
index 5f24184..b60483e 100644 | |
--- a/crowbar_framework/app/models/service_object.rb | |
+++ b/crowbar_framework/app/models/service_object.rb | |
@@ -1027,6 +1027,8 @@ class ServiceObject | |
# XXX: This should not be done this way. Something else should request this. | |
system("sudo -i /opt/dell/bin/single_chef_client.sh") if CHEF_ONLINE and !ran_admin | |
+ apply_role_post_chef_call(old_role, role, all_nodes) | |
+ |