Skip to content

Instantly share code, notes, and snippets.

View fuzzyweapon's full-sized avatar
🎯
Focusing

Julia fuzzyweapon

🎯
Focusing
View GitHub Profile
@fuzzyweapon
fuzzyweapon / instructions.md
Last active June 17, 2023 05:46
Remaking Your NowWhat Instance

Before doing this, make sure that you setup Chrome to be your default browser or the updater will fail (Firefox will be supported-ish in a future release which you will get automatically).

  1. Open ATLauncher to backup your configs Backup Your Configs
  2. Close down ATLauncher
  3. In Explorer, go to %APPDATA%\ATLauncher\instances, delete your NowWhat folder, and then re-make it Re-make Your Instance Folder
  4. Put packwiz-installer-bootstrap.jar into the new %APPDATA%\ATLauncher\instances\NowWhat folder
  5. Open Command Prompt and go to the new folder: cd %APPDATA%\ATLauncher\instances\NowWhat
@fuzzyweapon
fuzzyweapon / Ducky_One_2_Mini.md
Last active April 21, 2022 16:54
Ducky One 2 Mini Troubleshooting

Solved

"Bricked" (startup bug)

Steps for Repro

  1. Put into demo mode: LCTRL + CAPSLOCK + TAB 3 seconds on startup
  2. Unplug
@fuzzyweapon
fuzzyweapon / tut-adv-0-intro.md
Last active May 31, 2023 05:58
An advanced tutorial for Atlantis

Advanced Techniques Tutorial

If anyone is interested in more tutorials of things they find mentioned here or would like a sample set of settings files with instructions on how to safely try it out, let me know! ~monkey/fuzzyweapon

Please use the comments section (if you can) to provide feedback, corrections, improvements.


In this guide, we'll be stepping through a tutorial that demonstrates some advanced techniques.

@fuzzyweapon
fuzzyweapon / 01-forgetful_basics.md
Last active January 14, 2020 21:22
Google Sheets Tricks

Forgetful Basics

These are things I often need to use but forget. They aren't tricky or difficult, just reminders. * denotes a recommended method.

Return an empty/blank result...
Use `IFERROR(0/0)`
 IF(TRUE(),"blah",IFERROR(0/0))
@fuzzyweapon
fuzzyweapon / test-stdin-programmatic.sh
Created May 22, 2019 23:03
Set stdin programatically for a bash file. Useful for testing
set -- each one of us is a part of STDIN
@fuzzyweapon
fuzzyweapon / load-env-posix.sh
Last active May 22, 2019 22:59
Load a .env file - environment variable flat files
set -a; . conf-file; set +a
@fuzzyweapon
fuzzyweapon / preserve-last-modified.build.gradle.kts
Created October 13, 2018 01:15
Preserve last modified in copy actions in Gradle without using ant.copy task.
// From https://github.com/gradle/kotlin-dsl/blob/70aca202558f2f6e43cd8ead3ec95d669bfd7b33/build.gradle.kts#L69
// Preserve file modified dates without using ant.copy task
val copyCurrentDistro by task<Copy> {
description = "Copies the current Gradle distro into '$customInstallationDir'."
from(gradle.gradleHomeDir)
into(customInstallationDir)
exclude("**/*kotlin*")
// preserve last modified date on each file to make it easier
@fuzzyweapon
fuzzyweapon / pretty-tasks.build.gradle.kts
Created October 13, 2018 01:12
Helper function for making registering callsites pretty.
// --- Utility functions -----------------------------------------------
inline fun <reified T : Task> task(noinline configuration: T.() -> Unit) =
tasks.registering(T::class, configuration)
// Usage
val customInstallation by task<Copy> {
description = "Copies latest gradle-kotlin-dsl snapshot over the custom installation."
dependsOn(copyCurrentDistro)
from(distribution)
into("$customInstallationDir/lib")
/**
* Returns `this` value if it satisfies the given [predicate] or `null`, if it doesn't.
*/
@kotlin.internal.InlineOnly
@SinceKotlin("1.1")
public inline fun <T> T.takeIf(predicate: (T) -> Boolean): T? {
contract {
callsInPlace(predicate, InvocationKind.EXACTLY_ONCE)
}
return if (predicate(this)) this else null
@fuzzyweapon
fuzzyweapon / changingProjectSourceLayout.kts
Last active July 5, 2018 17:52
Gradle - Kotlin DSLisms
// Sub-project or project build.gradle.kts
// This is for KotlinJVM and KotlinJVM multiplatform build.gradle.kts
java.sourceSets["main"].withConvention(KotlinSourceSet::class) {
kotlin.srcDir(file("src"))
}
java.sourceSets["test"].withConvention(KotlinSourceSet::class) {
kotlin.srcDir(file("test"))
}