Skip to content

Instantly share code, notes, and snippets.

View NikkyAI's full-sized avatar
🏳️‍⚧️

Nikky NikkyAI

🏳️‍⚧️
  • Berlin
View GitHub Profile
Download https://services.gradle.org/distributions/gradle-6.7-bin.zip finished, took 2 m 23 s 762 ms (102,8 MB)
Starting Gradle Daemon...
Gradle Daemon started in 1 s 328 ms
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Failed to detect whether we are running on Google Compute Engine.
java.net.SocketException: Network is unreachable: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
@NikkyAI
NikkyAI / Main.kt
Last active October 15, 2020 14:47
import io.ktor.application.*
import io.ktor.server.engine.*
import io.ktor.server.netty.*
import kotlinx.coroutines.*
import java.util.concurrent.TimeUnit
// start embedded server and close gracefully
fun main(args: Array<String>) {
System.setProperty(DEBUG_PROPERTY_NAME, DEBUG_PROPERTY_VALUE_ON)
@NikkyAI
NikkyAI / monty_hall.kts
Created September 12, 2020 19:31
monty hall problem thing
import kotlin.random.Random
val doorCount = 4
val values = List(doorCount-1) { false } + true
var stick = 0
var switch = 0
repeat(10000) {
val doors = values.shuffled()
@NikkyAI
NikkyAI / Voodoo_Support_Wishlist.md
Last active March 29, 2020 18:37
I wish such a tool would exist

Launcher Tool

handles forge (1.6 .. 1.15) and fabric

handles installing / creating / updating MultiMC packs

defines a format to distribute pack (similar to Skcraft format? without the library bullshit?)

handles installing servers (headless commandline)

@NikkyAI
NikkyAI / CommandManagerServerMixin.java
Created November 7, 2018 20:21
how to register custom commands in fabric
import com.mojang.brigadier.CommandDispatcher;
import net.fabricmc.konfig.TestCommand;
import net.minecraft.command.ServerCommandManager;
import net.minecraft.command.ServerCommandSource;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@NikkyAI
NikkyAI / openpack-out.json
Created March 29, 2018 03:47
Voodoo file formats
{
"name" : "openpack",
"title" : "Open Source Adventure",
"mcVersion" : "1.12.2",
"forge" : 2601,
"entries" : [ {
"provider" : "CURSE",
"projectID" : 243121,
"fileID" : 2544279
}, {
# -*- coding: utf-8 -*-
import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer
import numpy
def main():
@NikkyAI
NikkyAI / PKGBUILD
Last active July 16, 2017 22:20
odin PKGBUILD
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# The following guidelines are specific to BZR, GIT, HG and SVN packages.
# Other VCS sources are not natively supported by makepkg yet.
# Maintainer: NikkyAI <root@nikky.moe>
pkgname=Odin-git # '-bzr', '-git', '-hg' or '-svn'
#!/bin/env zsh
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=${0:a:h}
cd $DIR
mkdir -p $DIR/data
cd $DIR/data
genpactree() {
pactree $1 --graph | tee $1.dot | dot -T png -o $1.png
#!/bin/bash
#!/bin/bash
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
launcher=Launcher
upload_folder=$DIR/.upload/.launcher/
tools=.
URLBASE="https://nikky.moe/mc/.launcher/"
echo $DIR
name=launcher