Skip to content

Instantly share code, notes, and snippets.

@Yanrishatum
Yanrishatum / hxsl-cheatsheet.md
Last active October 6, 2023 12:55
HXSL cheat-sheet

HXSL cheat-sheet

This is a WIP of a cheat-sheet that I will finish Eventually™

Types

Mapping of the shader types to Heaps types:

Float = Float
Int = Int
Bool = Bool
@RadGH
RadGH / df-rooms.md
Last active December 10, 2017 16:04
Dwarf Fortress Rooms & Industries for 42.04

Dwarf Fortress Rooms & Industries

This is a list of rooms and industries that you will be building in Dwarf Fortress v42.xx. Use it to help plan your fortress, get some ideas, or figure out what should go in your stockpiles.

Primary Industries

Food

Indoor Storage: Raw plants, Prepared meals

@kevinresol
kevinresol / AssetPaths.hx
Created August 22, 2015 01:44
Macro to read asset paths
package util;
/**
* ...
* @author Kevin
*/
@:build(util.AssetPathsMacro.build())
class AssetPaths
{
@williamahartman
williamahartman / FrameRate.java
Created January 15, 2015 03:17
Display framerate in a LibGDX graphics window. Call update() and render() in your main render method.
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Disposable;
import com.badlogic.gdx.utils.TimeUtils;
/**
* A nicer class for showing framerate that doesn't spam the console
* like Logger.log()
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@nadako
nadako / ArrayRead.hx
Last active March 14, 2024 07:57
Recursive read-only type generator for JSON structures (based on @:genericBuild)
abstract ArrayRead<T>(Array<T>) from Array<T> {
@:arrayAccess inline function get(i:Int):T return this[i];
public var length(get,never):Int;
inline function get_length() return this.length;
}
@martinwells
martinwells / gist:5980517
Created July 12, 2013 00:43
Simple Haxe logging with colors
/**
Simple, colorful logging!
Setup
=====
Somewhere really early in your code do a:
Log.init();
This will setup the logger methods and coloring stuff.
Logging
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000