Skip to content

Instantly share code, notes, and snippets.

View Xalcon's full-sized avatar

Xalcon Xalcon

View GitHub Profile
@Xalcon
Xalcon / index.html
Created October 17, 2019 12:29
Minimal typescript + sass web setup with auto-reload development http server
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="HTML5 Website">
<meta name="author" content="">
@Xalcon
Xalcon / nlog colored console files
Created October 12, 2019 13:39 — forked from clupasq/nlog colored console files
nlog configuration for colored console + info&error files
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="coloredConsole" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false"
layout="${longdate}|${pad:padding=5:inner=${level:uppercase=true}}|${message}" >
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
<highlight-row condition="level == LogLevel.Info" foregroundColor="Gray" />
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
@Xalcon
Xalcon / genshim.cpp
Created September 12, 2019 09:20 — forked from nohbdy/genshim.cpp
Shim DLL Generation
// Code originally found on http://www.hulver.com/scoop/story/2006/2/18/125521/185
// Created by Rogerborg
#include <stdio.h>
#include <windows.h>
#include <list>
using namespace std;
// Change this to the name of the DLL that you want to clone
#define CLONE_DLL "WS2_32"
@Xalcon
Xalcon / BlockIdEater.java
Created January 6, 2019 01:12
Simple mod to eat up a lot of block IDs. Used to reproduce a bug with chisel and just enough IDs.
package net.xalcon.blockideater;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Xalcon
Xalcon / gist:634160d07f2f7ffa73a838245b901aac
Created September 7, 2017 16:41 — forked from ulrikdamm/gist:8274171
PMX 2.0 file format
# PMX 2.0 file format #
This is a description of the PMX file format. This is used for 3D models in Miku Miku Dance (MMD).
Since I couldn't find any English descriptions of the PMX file format, I've made this, which is translated from http://gulshan-i-raz.geo.jp/labs/2012/10/17/pmx-format1/. I haven't used this file format yet, so please don't ask me what everything means.
An English guide to the PMD file format, which preceeded PMX, can be found here: http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data.
If you want to learn more, there are some open source projects on GitHub which can read this format, so go take a look at them.
Note: fields with type text begins with an int (32 bit) with how many bytes of text the section is.
@Xalcon
Xalcon / pmx21.md
Created September 7, 2017 16:19 — forked from felixjones/pmx21.md
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@Xalcon
Xalcon / index.html
Last active July 27, 2017 21:24
Empty function overhead (http://jsbench.github.io/#378bdaa84fddcabf212cb1c1262124b5) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Empty function overhead</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@Xalcon
Xalcon / shapeless.json
Last active July 1, 2017 16:53
Shapeless Example
{
"type": "minecraft:crafting_shapeless",
"result": {
"item": "minecraft:diamond",
"data": 0
},
"ingredients": [
{
"item": "minecraft:gunpowder"
},
@Xalcon
Xalcon / 0001-fixed-idea-task-module-configuration.patch
Created June 28, 2017 15:27
Didnt test it fully, but it seem to work.
From 61b82b19fc1db023105041534128ef6561ce3fb8 Mon Sep 17 00:00:00 2001
From: xalcon <xalcon@xalcon.net>
Date: Wed, 28 Jun 2017 17:26:21 +0200
Subject: [PATCH] fixed idea task module configuration
---
src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java b/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java
@Xalcon
Xalcon / build.gradle
Last active June 23, 2017 14:54
experimental code that moves the "api" subpackage into its own jar which then gets re-packaged with a jar that doesnt have said sub-package. Output is a jar with the qualifier "universal". This concept can be adapted to pacakage a Coremod-only jar into the mainmod.jar to comply to the new forge coremod policy.
// at the end of your build.gradle
// Create API library zip
// Warning: This jar will be reobfuscated! Its only used to package it with the universal jar
task apiJar(type: Jar) {
from(sourceSets.main.output) {
include "**/api/**"
}
classifier = 'obf-api'
includeEmptyDirs = false