Skip to content

Instantly share code, notes, and snippets.

package gigaherz.survivalist.itemcap;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
@gigaherz
gigaherz / ui.gddl
Last active January 22, 2016 23:22
Screen {
version="1",
ProgressBar { geometry="30x40+10,10" }
Panel {
geometry = "30x80+10,60",
title = "Some Awesome Panel",
showBorder = true,
Label { text="Hello, GUI!" }
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <windows.h>
#include <math.h>
struct NoteInfo_t {
const char * note;
float freq;
The Minecraft Redstone-inspired Pseudo-language
Registers and ports
--------------------
R0.. R15 Redstone lines, each a 16 bit SIGNED register, but the value is shifted every instruction
If the top bit is 0, it shifts down,
If thetop bit is 1, it shifts up
C0..15 Cauldrons, respectively pre-filled with "(1<<n)-1"
function SetupForm{
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null;
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null;
$form = New-Object System.Windows.Forms.Form;
$dgv = New-Object System.Windows.Forms.DataGridView;
$form.Text = "TCP Connection Status";
$form.Name = "form";
@gigaherz
gigaherz / ALU.vhdl
Created October 14, 2013 19:28
An implementation of a simple 4-instruction CPU, in VHDL
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
use work.constants.all;
use work.ctypes.all;
entity ALU is port (
clk : in std_logic;
@gigaherz
gigaherz / lcd3x.cg
Created November 1, 2012 13:54
Cg recreation of the Lcd3x scaling algorithm.
/* COMPATIBILITY
- HLSL compilers (untested)
- Cg compilers
*/
/*
Author: Gigaherz
License: Public domain
*/