Skip to content

Instantly share code, notes, and snippets.

View morristech's full-sized avatar
🔴
"What I cannot create, I do not understand"

Wade morristech

🔴
"What I cannot create, I do not understand"
View GitHub Profile
@morristech
morristech / app.py
Created September 16, 2022 03:56 — forked from thomasdarimont/app.py
Simple python example using flask, flask_oidc and keycloak
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@morristech
morristech / A_script_to_Git_all_the_repos.md
Created September 16, 2022 03:51 — forked from DonRichards/A_script_to_Git_all_the_repos.md
Clones and or pulls the latest updates Org Repos into current working directory. If you just want to go down all the directories you already have and pull the latest from the current branches use this instead: find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;

Get all of the repos

It downloads all of the repos for a person or organization.

@morristech
morristech / git-commit-log-stats.md
Created September 12, 2022 10:55 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@morristech
morristech / setup_android_studio.sh
Created July 4, 2022 11:44 — forked from bmc08gt/setup_android_studio.sh
Android Studio bash installation script
#!/bin/bash
# only works atm if only one jdk package in downloads
DOWNLOADS=$HOME/Downloads
CURRENT_VERSION=$(java -version 2>&1)
JDK=` ls $DOWNLOADS | grep "jdk"`
STUDIO_URL=http://dl.google.com/android/studio/install/0.3.2/android-studio-bundle-132.893413-linux.tgz
if [ "uname -m" == "i386" -o "uname -m" == "i686" ]; then
ARCH=32
else
@morristech
morristech / README.md
Created June 21, 2022 21:54 — forked from typebrook/README.md
A bash script for gist management #bash #gist

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@morristech
morristech / AndroidAESCipherHelper.kt
Created May 23, 2022 13:37 — forked from FrancescoJo/AndroidAESCipherHelper.kt
Android AES cipher helper with system generated key. No more static final String key in our class - an approach which is very vulnerable to reverse engineering attack. Available only API Level 23(M)+
import android.annotation.TargetApi
import android.os.Build
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import android.util.Base64
import timber.log.Timber
import java.security.GeneralSecurityException
import java.security.KeyStore
import javax.crypto.Cipher
import javax.crypto.KeyGenerator
@morristech
morristech / install-rust-aarch64-apple-darwin.sh
Created May 10, 2022 09:19 — forked from briansmith/install-rust-aarch64-apple-darwin.sh
Bootstrap a working native aarch64-apple-darwin Rust toolchain
#!/bin/bash
# "Bash Strict Mode with logging"
set -eux -o pipefail
IFS=$'\n\t'
case $(uname -p) in
arm)
;;
*)
@morristech
morristech / how-to-generate-and-use-private-keys-with-openssl-tool.md How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@morristech
morristech / MockProxy.kt
Created May 2, 2022 05:49 — forked from rkam88/MockProxy.kt
A Java dynamic proxy that calls either the real or mocked implementation of an interface
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.lang.reflect.InvocationHandler
import java.lang.reflect.InvocationTargetException
import java.lang.reflect.Method
import java.lang.reflect.Proxy
import kotlin.coroutines.Continuation
import kotlin.coroutines.cancellation.CancellationException