Skip to content

Instantly share code, notes, and snippets.

View fadookie's full-sized avatar
🕹️
😹

Eliot Lash fadookie

🕹️
😹
View GitHub Profile
@fadookie
fadookie / spren1.java
Last active June 15, 2020 03:57
Blockbench to fabric export
package com.eliotlash.stormlight;
// Made with Blockbench 3.5.4
// Exported for Minecraft version 1.15
// Paste this class into your mod and generate all required imports
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.util.math.MatrixStack;
@Mixin(ServerWorld.class)
public class ServerWorldMixin extends World {
// I had to implement this to make the compiler happy but I'm hoping it's not actually going to be called
private ServerWorldMixin() {
super(null, null, null, null, false);
}
// This was working before I tried to access this.dimension
@Inject(at = @At("RETURN"), method = "<init>(Lnet/minecraft/server/MinecraftServer;Ljava/util/concurrent/Executor;Lnet/minecraft/world/WorldSaveHandler;Lnet/minecraft/world/level/LevelProperties;Lnet/minecraft/world/dimension/DimensionType;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/server/WorldGenerationProgressListener;)V")
private void constructor(MinecraftServer server, Executor workerExecutor, WorldSaveHandler worldSaveHandler, LevelProperties properties, DimensionType dimensionType, Profiler profiler, WorldGenerationProgressListener worldGenerationProgressListener, CallbackInfo info) {
@fadookie
fadookie / .gitconfig
Last active June 27, 2019 21:26
Hub git aliases
[alias]
browse-tree = !cd -- ${GIT_PREFIX:-.} && hub browse -- tree/"${1-$(git rev-parse --abbrev-ref HEAD)}" # Use argument, or default to HEAD
browse-commit = !cd -- ${GIT_PREFIX:-.} && hub browse -- commit/"${1-$(git rev-parse --short HEAD)}" # Use argument, or default to HEAD
browse-file = !cd -- ${GIT_PREFIX:-.} && hub browse -- blob/"$(git rev-parse --short HEAD)"/$(git ls-files --full-name "$1")
browse-pr = !hub pr list -h "$(git rev-parse --abbrev-ref HEAD)" -f '%U%n' | xargs open
@fadookie
fadookie / realmMock.js
Created September 18, 2018 00:09 — forked from hyb175/realmMock.js
Realm Mock backed by AsyncStorage to try to enable on-device debugging
// https://github.com/realm/realm-js/issues/370#issuecomment-270849466
import { AsyncStorage } from "react-native"
const STORAGE_KEY = 'MockRealm';
export default class Realm {
constructor(params) {
this.schema = {};
this.callbackList = [];
@fadookie
fadookie / Zscript-learning-rant.md
Last active October 24, 2023 11:21
Rant about learning GZDoom scripting/Zscript

In response to Which ZDooM Script Language to Use?

Just wanted to chime in here as someone who recently learned all three for my first WAD project. I was also given the advice "Learn Zscript", so I did. But I have to say, coming as a total beginner in Doom modding and learning Zscript was definitely jumping off the deep end, even for an experienced programmer like myself. Please excuse my ignorance if I am missing out on things here, and I would love to be enlightened to the contrary, but I would like to share from my recent and hard-won experiences.

There is an awful lot of context that you need to understand in order to be productive as a Doom scripter. And currently, since Zscript is the newest and most advanced scripting language, it has the least documentation of any of them (and what documentation there is tends to assume familiarity with the other two systems.)

I've heard several folks mention similarity to C++ as a reason to learn it. And it'

@fadookie
fadookie / Services.cs
Last active January 19, 2018 21:57
Service manager for unity (for accessing single instances of objects globally) and tests
using System;
using System.Collections.Generic;
/// <summary>
/// Simple service manager. Allows global access to a single instance of any class.
/// Copyright (c) 2014-2017 Eliot Lash
/// </summary>
public class Services
{
//Statics
@fadookie
fadookie / download_steam_app.sh
Created April 27, 2017 01:48
Steam downloader for non mac/linux games on mac/linux
#!/usr/bin/env bash
###
# This script uses SteamCmd to force downloads of games for other platforms.
# First, install SteamCmd from https://developer.valvesoftware.com/wiki/SteamCMD
# Place this script next to steamcmd.sh and make it executable (chmod u+x download_steam_app.sh)
# Finally, set the config to refer to your username. If you are already signed in to steam you should not need to enter a password.
#
# Usage:
# ./download_steam_app.sh <steam_store_url>
@fadookie
fadookie / gist:c71edcfe1e595f5cab374d4297ba1e02
Last active October 18, 2018 17:34 — forked from brentvatne/gist:a267d10eabd2d91a8d44
Auto-resizing text in pure js for react native, updated for RN 0.40
'use strict';
import React, { Component } from 'react';
import { findNodeHandle, StyleSheet, Text, View, NativeModules } from 'react-native';
const UIManager = NativeModules.UIManager;
class AutoresizeText extends Component {
constructor(props) {
super(props);
@fadookie
fadookie / bash_list_library.sh
Last active August 2, 2017 21:55
Example of bash array to pipe-delimited string de/serialization, for discussion at https://discuss.bitrise.io/t/output-from-multiple-instances-of-the-same-step/538
# WARNING! The following is not as safe as I originally thought and I'm not sure yet the right way to do this.
# See https://unix.stackexchange.com/questions/383541/how-to-save-restore-all-shell-options-including-errexit
enable_safety() {
BITRISE_CLI_PREVIOUS_SHELL_OPTIONS=$(set +o)
set -o nounset
set -o errexit
set -o pipefail
}
@fadookie
fadookie / .bash_profile
Last active November 16, 2016 21:33
.bash_profile for android/unity stuff
export JAVA_HOME=`/usr/libexec/java_home`
export ANDROID_HOME="$HOME/Dev/android/android-sdk-macosx" #Set this path to your android sdk
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:${ANDROID_HOME}/build-tools/$(ls ${ANDROID_HOME}/build-tools | sort -r | head -n 1)"
alias unilogcat='adb logcat|egrep "Unity|Kiwi|GamesUnitySDK|GamesNativeSDK|Supersonic|KONG|E API"'