Skip to content

Instantly share code, notes, and snippets.

View kgundula's full-sized avatar

Khuthadzo Gundula kgundula

View GitHub Profile
@nesquena
nesquena / .gitignore
Last active April 4, 2019 11:22
Android .gitignore File
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@alvarow
alvarow / openssl-cheat.sh
Last active November 12, 2024 16:01
OpenSSL and Keytool cheat sheet
# Generate a new key
openssl genrsa -out server.key 2048
# Generate a new CSR
openssl req -sha256 -new -key server.key -out server.csr
# Check certificate against CA
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem
# Self Signed
@JoeRoddy
JoeRoddy / FirebaseToFirestore.js
Created October 18, 2017 16:19
Convert Firebase Database JSON to Firestore Collections
var db = firebase.firestore();
var content = require("./sourceData.json");
content &&
Object.keys(content).forEach(contentKey => {
const nestedContent = content[contentKey];
if (typeof nestedContent === "object") {
Object.keys(nestedContent).forEach(docTitle => {
firebase
.firestore()
@josefernand
josefernand / MultiStartNavigationUI.java
Created August 19, 2018 13:33
Android Navigation multiple start destinations. Java version based on Sam Clarke's workaround https://www.samclarke.com/android-navigation-component-multiple-start-destinations/
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.graphics.drawable.DrawerArrowDrawable;
@bmc08gt
bmc08gt / Chips.kt
Last active December 15, 2023 03:39
Jetpack Compose Chips
package com.planoly.ui.compose.components
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
@bmc08gt
bmc08gt / monkey.gradle
Created July 20, 2021 19:40
Gradle task to piggyback off install task allowing CLI opening of the app.
android.applicationVariants.all { variant ->
task "open${variant.name.capitalize()}" {
dependsOn "install${variant.name.capitalize()}"
doLast {
exec {
commandLine "adb shell monkey -p ${variant.applicationId} -c android.intent.category.LAUNCHER 1".split(" ")
}
}
}