Skip to content

Instantly share code, notes, and snippets.

View StefanOltmann's full-sized avatar

Stefan Oltmann StefanOltmann

View GitHub Profile
@mikehardy
mikehardy / README.md
Last active September 2, 2022 19:15
Android emulator performance on macos-11 Github Actions Runners

Performance characteristics of Android emulators on GitHub Actions

Lots of projects need to test android apps, and use GitHub Actions infrastructure to do so.

This document intends to show current timings for a sample workload, to inform what emulators are a good match for testing.

Test Conditions

  • We use the AnkiDroid androidTests
  • they are long enough to execute that they form a nice balance between cold start emulator time so neither dominates
@epool
epool / BuildXcFramework.kt
Last active December 5, 2023 13:11
Builds a XcFramework from a shared module in KMM.
//region XcFramework tasks
val xcFrameworkPath = "xcframework/${project.name}.xcframework"
tasks.create<Delete>("deleteXcFramework") { delete = setOf(xcFrameworkPath) }
val buildXcFramework by tasks.registering {
dependsOn("deleteXcFramework")
group = "build"
val mode = "Release"
val frameworks = arrayOf("iosArm64", "iosX64")
@shank03
shank03 / XORCryptor.kt
Last active December 29, 2023 21:07
A simple XOR cipher/encryption in kotlin :)
/*
* Copyright (c) 2020, Shashank Verma <shashank.verma2002@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@nicolasdao
nicolasdao / open_source_licenses.md
Last active July 21, 2024 20:51
What you need to know to choose an open source license.
@gamma
gamma / README.md
Last active July 5, 2024 17:32
How to connect a docker container to the docker daemon on a Synology NAS

Note: This originates from: https://forum.synology.com/enu/viewtopic.php?f=258&t=107508&sid=78d911737c5ecea1f9087bdab13612bf&start=15#p478281

Here are steps that I have modified to work for me. This assumes you have a shared folder named "docker" in volume1.

We need to Symlink /var/run/docker.sock to /volume1/docker/docker.sock, because Synology Docker GUI will not be able to run it when it's pointed directly to /var/run/docker.sock. Also the symlink needs to persist after reboot. To make it do so, you will need to create an automated task in your Synology DSM via "Task Scheduler".

  • Go to "Control Panel" > "Task Scheduler".
  • Click "Create" > "Scheduled Task" > "User-defined Script".
  • On the "Create Task: Window, make sure "User:" is selected as "root" and rename the "Task:" to whatever you like.
  • Click "Schedule" tab. Under "Date - Run on the following days", select "Daily". Under "Time - Frequency", select "Every 1 hour(s)" (just to be on the safe side).
@jamieweavis
jamieweavis / macos-app-icon.md
Last active June 30, 2024 08:23
How to create an .icns macOS app icon
@mslinn
mslinn / decompile.bat
Last active July 23, 2024 13:17
Decompile JVM class files using IntelliJ IDEA's embedded FernFlower decompiler
java -cp "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.2\plugins\java-decompiler\lib\java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -dgs=true . src
@jankronquist
jankronquist / client-certificate-authentication.md
Last active January 24, 2021 13:49
Java certificate authentication for both server and client using shared trusted CA.

Certificates

CA and trust keystore

keytool -genkeypair -keyalg RSA -keysize 2048 -validity 365 -alias ca -dname "CN=ca,O=HMS,S=SE" -keystore ca.jks -storepass password
keytool -exportcert -rfc -alias ca -keystore ca.jks -storepass password > ca.pem
cat ca.pem | keytool -importcert -alias ca -noprompt -keystore trust.jks -storepass password

server cert