Skip to content

Instantly share code, notes, and snippets.

View jasonsparc's full-sized avatar
🤖

Jason jasonsparc

🤖
View GitHub Profile
@ljavuras
ljavuras / List of icons.md
Last active June 18, 2025 18:47
List of icons in Obsidian
/**
 * List all icons available to `obsidian.setIcon()`
 * 
 * @author Ljavuras <[email protected]>
 */

dv.container.createEl("style", { attr: { scope: "" }, text: `
.icon-table {
 display: flex;
@serpro69
serpro69 / build.gradle.kts
Last active November 13, 2024 16:26
gradle junit test output
import org.gradle.api.tasks.testing.TestResult.ResultType
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
//...
tasks.test {
useJUnitPlatform()
maxParallelForks = 1
testLogging { // credits: https://stackoverflow.com/a/36130467/5917497
@agnostic-apollo
agnostic-apollo / hasFragileUserData.md
Last active June 20, 2025 05:44
Android hasFragileUserData AndroidManifest.xml flag

The hasFragileUserData flag can be added to the application node of AndroidManifest.xml. If its value is true, then when the user uninstalls the app, a prompt will be shown to the user asking him whether to keep the app's data.

<application
	...
    android:hasFragileUserData="true" tools:targetApi="q">
...
</application>
@latant
latant / await_shutdown.kt
Created October 23, 2020 10:50
A coroutine function that suspends until a shutdown is requested
import kotlin.concurrent.thread
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
suspend fun awaitShutdown() {
suspendCoroutine<Unit> { c ->
Runtime.getRuntime().addShutdownHook(thread(start = false) {
c.resume(Unit)
})
}
@szktty
szktty / clockwork-base32.md
Last active August 6, 2024 06:23
Clockwork Base32: A variant of Base32 inspired by Crockford's Base32
@gabrielemariotti
gabrielemariotti / README.MD
Last active September 24, 2024 09:22
How to use the ShapeableImageView.

The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.

In your layout you can use:

 <com.google.android.material.imageview.ShapeableImageView
      android:id="@+id/image_view"
      app:srcCompat="@drawable/..." />

Then in your code apply the ShapeAppearanceModel to define your custom corners:

@craigstjean
craigstjean / javasoft.reg
Last active May 22, 2023 19:16
Configure OpenJDK in Windows Registry
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
"CurrentVersion"="1.8"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8]
"JavaHome"="C:\\Tools\\Java\\jdk8u192-b12\\jre"
"RuntimeLib"="C:\\Tools\\Java\\jdk8u192-b12\\jre\\bin\\j9vm\\jvm.dll"
// ==UserScript==
// @name EmuParadise download script
// @version 1
// @description Downloads games directly after clicking their name
// @author Eptun
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name EmuParadise Download Workaround - 1.1.1
// @version 1.1.2
// @description Replaces the download button link with a working one
// @author Eptun
// @match https://www.emuparadise.me/*/*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @grant none
// ==/UserScript==
@ChrisK91
ChrisK91 / View HTML source with JavaScript and CSS styles.py
Created February 17, 2018 16:15
Reupload of the "View HTML source with JavaScript and CSS styles" add on for anki
# -*- mode: Python ; coding: utf-8 -*-
# • View HTML source with JavaScript and CSS styles
# https://ankiweb.net/shared/info/1128123950
# https://github.com/ankitest/anki-musthave-addons-by-ankitest
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
# Copyright (c) 2016 Dmitry Mikheev, http://finpapa.ucoz.net/
#
# Menu Cards - View Source code Body Alt+F3
# shows HTML source with JavaScript and CSS styles
# but without jQuery Menu Cards