Skip to content

Instantly share code, notes, and snippets.

View fadookie's full-sized avatar
🕹️
😹

Eliot Lash fadookie

🕹️
😹
View GitHub Profile
@fadookie
fadookie / SpawnArea.cs
Created January 27, 2015 19:41
Spawn area component for Unity, spawns prefabs in a defined 2D area
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(BoxCollider2D))]
public class SpawnArea : MonoBehaviour {
public GameObject spawnedPrefab;
BoxCollider2D spawnArea;
Vector2 maxSpawnPos;
float lastSpawnTimeS = -1;
@fadookie
fadookie / README.md
Last active August 19, 2020 20:30
Proof-of-concept plugin to export blockbench entity models for Fabric mods

Moved to official plugins repo!

Good news, this plugin has graduated to the official repo. Please see below for install and usage instructions.

@fadookie
fadookie / Comment.cs
Created January 27, 2015 19:39
Comment component for Unity3D for storing multiline comments in the editor inspector. Doesn't do auto linebreaks yet (you have to add them manually) but feel free to send me a patch. :)
using UnityEngine;
using System.Collections;
public class Comment : MonoBehaviour {
public string comment;
}
@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 / 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);
/// <summary>
/// Handles parsing and execution of console commands, as well as collecting log output.
/// Copyright (c) 2014-2015 Eliot Lash
/// </summary>
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Text;
@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 = [];