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

How to

  1. yarn add --dev @svgr/cli
  2. Config in package.json
"scripts": {
    "svgr": "npx @svgr/cli --out-dir src/components/icons --ignore-existing -- src/assests/icons"
}
  1. yarn svgr
@rkam88
rkam88 / MockProxy.kt
Last active November 5, 2024 08:37
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
@morristech
morristech / 1-setup.md
Created February 28, 2022 21:40 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@hirbod
hirbod / expoAnimatedWebPforIOSandAndroid.md
Last active January 10, 2024 09:11
expo-config-plugin: animated webP support for Expo SDK44+ and Custom Dev Client (with FastImage) support

I recommend to not use this anymore. Switch over to expo-image

If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image /> and <FastImage /> (read comments):

Android

// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />

const {
@bhb
bhb / clojure_m1.md
Last active September 12, 2024 02:48
How to set up Clojure on M1 using Homebrew: A thread

How to set up Clojure on M1 using Homebrew: A thread

I’m upgrading from a Mid 2014 MacBook Pro, so this isn’t a fair comparison to recent Intel machines, but if you’re like me and were waiting for a MacBook with a decent keyboard, you’ll see a big speed boost.

Non-scientific comparison - time to compile my ClojureScript project

  • Mid 2014 MacBook Pro - 14s
  • M1 Pro MacBook Pro (under Rosetta) - 17s
  • M1 Pro MacBook Pro (native) - 6s
@ChipCE
ChipCE / readme.md
Last active November 9, 2024 05:36
Klipper bed mesh on print area only macro install guide

READ THIS FIRST

Adaptive bed mesh is merged into klipper master branch. You can use this feature without this custom macro. Official klipper adaptive bed mesh

Klipper mesh on print area only install guide

What this macro do

  • This macro will dynamically changing the bed mesh area based on the size of the parts will be printed. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)

A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation


A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation

@bmc08gt
bmc08gt / WorkEnqueuer.kt
Created October 21, 2021 18:59
WorkManager state observation
interface WorkListener {
fun onConditionNotMet()
fun onStart()
fun onSuccess(data: Data)
fun onError(data: Data)
}
class WorkEnqueuer(val context: Context) {
private var listener: WorkListener? = null
@bmc08gt
bmc08gt / app_build.gradle
Last active July 4, 2022 11:46
Gradle task that downloads a signing config from a remote server
def execDownloadSigningInfo(ProductFlavor flavor) {
task z {
download {
src "$url"
dest {
return rootProject.file("../file")
}
onlyIfNewer true
}
@budioktaviyan
budioktaviyan / coverage.gradle.kts
Created June 20, 2021 04:35
Generate Coverage Reports (Jacoco) Tasks
//
// Generate Coverage Reports (Jacoco) Tasks
//
project.afterEvaluate {
/* ktlint-disable max-line-length */
//
// Check if project contain Android Application plugin
//
project.plugins.firstOrNull { plugin -> plugin is AppPlugin } ?: return@afterEvaluate