Skip to content

Instantly share code, notes, and snippets.

View erikhuizinga's full-sized avatar
🤖
Testing droids...

Erik Huizinga erikhuizinga

🤖
Testing droids...
View GitHub Profile
@erikhuizinga
erikhuizinga / 7-wonders-duel-solo.kts
Last active November 13, 2020 20:10
7 Wonders Duel: Solo helper in Kotlin Script
val setup = """
ℹ️ SETUP
Set up the Age I cards like in a normal game, but sit so you're facing the first row of cards in the structure.
The zone to the left of the card structure is your City. The zone to the right of the structure is the Leader's City. Begin the game by giving 7 coins to yourself and none to the Leader.
Shuffle all the Wonder cards and draw 3. Choose 2 of these cards for yourself and give the third to the Leader.
Do this a second time. You will therefore start with 4 Wonder cards in your city and 2 in the Leader's City.
The Leader's 2 Wonder cards are treated as if already constructed. Immediately apply the following effects if they are on the Leader's Wonders:
@Zhuinden
Zhuinden / FragmentViewBindingDelegate.kt
Last active February 24, 2024 20:13
Fragment view binding delegate
// https://github.com/Zhuinden/fragmentviewbindingdelegate-kt
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty
@bobvanderlinden
bobvanderlinden / README.md
Last active May 18, 2018 12:02
Changelog in Markdown/JSON using Gradle

This Gradle script will generate a changelog.json file from a recent_changes.txt. The recent_changes.txt is a Markdown file where a developer can define the changelog and the Gradle task will convert it to JSON, so that it can be used inside a app or in later Gradle tasks. The resulting JSON structure can be found in example.changelog.json.

In addition, the changelog.json is reused for a whatsnew file that can be uploaded to Google Play using Google Play Publisher.

@bobvanderlinden
bobvanderlinden / build.gradle
Created May 18, 2018 07:16
Publish APK over SSH using Gradle
ant.taskdef(
name: 'scp',
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
classpath: configurations.sshAntTask.asPath
)
// Publish APK and mapping file over SCP
android.applicationVariants.all { variant ->
if (variant.buildType.name != "release") {
return