Skip to content

Instantly share code, notes, and snippets.

View DarkGuardsman's full-sized avatar
😴
5% burnout recovered

Robin Seifert DarkGuardsman

😴
5% burnout recovered
View GitHub Profile
@hay
hay / gist:1351230
Last active October 14, 2024 00:30
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
<style>
body {
background: white;
text-align: center;
@tausen
tausen / gist:4261887
Created December 11, 2012 20:30
pthread, sem_wait, sem_post example
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <semaphore.h>
sem_t semaphore;
void threadfunc() {
@eric-wieser
eric-wieser / itemset.lua
Last active August 9, 2024 02:47
A library to make inventory management with computercraft turtles more straightforward
local ItemSet = {}
ItemSet.__index = ItemSet
ItemSet.new = function(mapping)
return setmetatable({mapping=mapping}, ItemSet)
end
-- internal functions
local _useItem = function(self, fn, name)
local i = self:slot(name)
turtle.select(i)
@paulund
paulund / add-option-to-dropdown.js
Created June 25, 2013 18:50
Add and Remove Options in Select using jQuery
$("#selectBox").append('<option value="option6">option6</option>');
public class PasteCommand extends CommandBase {
private final SchematicFile schFile;
public PasteCommand(SchematicFile schFile) {
this.schFile = schFile;
}
@Override
public String getCommandName() {
public interface IMultiBlockHandler
{
public void addMember(World world, int x, int y, int z);
public void addSpecialHandler(Object obj);
}
@ljfa-ag
ljfa-ag / modelbase_to_json.perl
Last active November 1, 2022 14:02
Script for converting exported Techne models for Minecraft into other model formats
#!/usr/bin/env perl
# Released into Public Domain
# A quick and dirty script to convert ModelBase Java code as generated
# by Techne (or possibly Tabula) into Minecraft's JSON model format.
# It is quite limited (it does not handle rotations, as the JSON model format
# is limited in that regard anyway), but it is at least a help.
# Usage:
# modelbase_to_json input.java > output.json
@nemotoo
nemotoo / .gitattributes
Last active October 14, 2024 00:03
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@BirkhoffLee
BirkhoffLee / MinecraftAFKMining.ahk
Created February 16, 2017 10:11
An AutoHotKey script for Minecraft AFK mining, which keep pressing the left mouse button and locks the movement of mouse while mining. Use "z" to toggle.
z::
if GetKeyState("LButton") {
Send % "{Click Up}"
BlockInput, MouseMoveOff
} else {
Send % "{Click Down}"
BlockInput, MouseMove
}
return
@williewillus
williewillus / foo.java
Last active July 4, 2023 01:01
recipe to json dumper
// You can include this in your mod/a pack/whatever you want, as long as that work follows the Mojang EULA.
// The original source is viewable at https://gist.github.com/williewillus/a1a899ce5b0f0ba099078d46ae3dae6e
// This is a janky JSON generator, for porting from below 1.12 to 1.12.
// Simply replace calls to GameRegistry.addShapeless/ShapedRecipe with these methods, which will dump it to a json in RECIPE_DIR
// Also works with OD, replace GameRegistry.addRecipe(new ShapedOreRecipe/ShapelessOreRecipe with the same calls
// After you are done, call generateConstants()
// Note that in many cases, you can combine multiple old recipes into one, since you can now specify multiple possibilities for an ingredient without using the OD. See vanilla for examples.
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();