Skip to content

Instantly share code, notes, and snippets.

View oliverspryn's full-sized avatar
☀️
Everyday is a great day!

Oliver Spryn oliverspryn

☀️
Everyday is a great day!
View GitHub Profile
@oliverspryn
oliverspryn / app.gradle
Last active October 18, 2018 19:01
Common Android Gradle Plugins
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'kotlin-android'
@oliverspryn
oliverspryn / dynatrace.gradle
Created October 18, 2018 19:04
Dynatrace Gradle Configuation Stub
apply plugin: 'com.dynatrace.tools.android'
dynatrace {
defaultConfig {
...
}
productFlavors {
dynatraceDev {
...
@oliverspryn
oliverspryn / build.sh
Last active October 18, 2018 20:20
Build an Android project in debug mode
./gradlew --build-file build.gradle assembleNoDynatraceDebug
@oliverspryn
oliverspryn / app.gradle
Last active October 19, 2018 20:34
A Gradle script which conditionally exclude a plugin based on the build variant
// Run with: ./gradlew --build-file build.gradle assembleNoDynatraceDebug
def task = gradle.startParameter.taskNames[0] ?: "" // Get "assembleNoDyntraceDebug"
if (!task.toLowerCase().contains("nodynatrace")) {
apply plugin: 'com.dynatrace.tools.android'
dynatrace {
defaultConfig {
...
}
@oliverspryn
oliverspryn / download-git-completion.sh
Last active September 18, 2020 06:29
Downloads the necessary scripts for Git completion on Zsh
# Create the folder structure
mkdir -p ~/.zsh
cd ~/.zsh
# Download the scripts
curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
@oliverspryn
oliverspryn / .zshrc
Created November 7, 2018 20:08
Configures the shell to utilize a preinstalled Git completion script
# Load Git completion
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
@oliverspryn
oliverspryn / auto-complete-clear.sh
Last active April 22, 2024 17:43
Clears out the autocompletion cache from Zsh
rm ~/.zcompdump
@oliverspryn
oliverspryn / README.md
Created April 30, 2019 16:21
Manually Squash a Commit

Even though GitHub and many other Git management platforms can squash commits, they do not always sign the squashed commit with a GPG key. However, if you manually squash all of your commits into one, and then sign that commit before merging the pull request, you can keep your signed commit as you merge it another branch.

This code sample assumes that your target merge branch is develop. Notice the -S on the commit, which signs it.

@oliverspryn
oliverspryn / Maze.cpp
Created April 30, 2019 16:22
Maze Generation and Solving Algorithm
#include "Maze.h"
Maze::Maze() : alreadyInit(false), solvedCounter(1), startSet(false) { }
Maze::~Maze() {
delete root;
//Deallocate the maze resolution matrix
for(int i = 0; i < this->dim.x; ++i) {
delete [] solved[i];
@oliverspryn
oliverspryn / ChromeCustomTabsNavigator.kt
Last active June 14, 2019 19:40
Interface for the Chrome Custom Tab Navigation Component destination type
@Navigator.Name("chrome")
class ChromeCustomTabsNavigator(private val context: Context) : Navigator<ChromeCustomTabsNavigator.Destination>() {
override fun createDestination(): Destination {
TODO("not implemented")
}
override fun navigate(destination: Destination, args: Bundle?, navOptions: NavOptions?, navigatorExtras: Extras?): NavDestination? {
TODO("not implemented")
}