Skip to content

Instantly share code, notes, and snippets.

@ds300
ds300 / yarn-flat-auto.js
Created June 28, 2017 11:45
Automatically choose the latest versions of all packages when running yarn --flat
#!/usr/bin/env node
# run this before using: yarn add --dev node-pty semver
const os = require("os")
const pty = require("node-pty")
const semver = require("semver")
function semverComparator(a, b) {
if (semver.lt(a, b)) {
@xinthink
xinthink / README-kotlin-dsl-deps-ext-intro.md
Last active January 21, 2020 06:04
Defining Dependencies in Gradle Kotlin DSL

This's for the article Defining Dependencies in Gradle Kotlin DSL.

If you're using [kotlin-dsl] in a multi-project manner, you may want to define all the dependencies in one place. You can put the files into buildSrc, define dependencies in a compat way like this:

extra.deps {
    "kt"("stdlib-jre7")
    "auto" {
        "common"("com.google.auto:auto-common:0.8")
        "service"("com.google.auto.service:auto-service:1.0-rc3")
@Arc-blroth
Arc-blroth / Fabric Game Providers.md
Created December 9, 2020 20:00
Fabric Game Providers
String getGameId();
String getGameName();

These first few methods are just the internal game id (examples: "minecraft", "javac") and user-friendly name of that game (example" "Minecraft")

String getRawGameVersion();
String getNormalizedGameVersion();

The "raw" game version can technically be any string. The "normalized" game version, however, should generally be a proper semantic version. I recommend that it be consistent even if the target game has changed versioning schemes.