Skip to content

Instantly share code, notes, and snippets.


Alex Parker zanders3

View GitHub Profile
zanders3 / ShipLayout.cs
Created May 11, 2019
Space Engineers ship layout script
View ShipLayout.cs
// ShipLayout by zanders3
// This script displays the layout and health status of your ship or station.
// To use run this script and add e.g. 'ShipLayout 0' or 'ShipLayoutHealth' to the CustomData of an LCD.
public Program() {
Runtime.UpdateFrequency = UpdateFrequency.Update100;
public delegate Vector3I RotateFunc(Vector3I pos, Vector3I size);
static Vector3I Rot1(Vector3I pos, Vector3I size) { return new Vector3I(size.Y - pos.Y, pos.X, pos.Z); }
View printer.html
<textarea id="printContent"></textarea>
<input type="submit" onclick="connectAndPrint()" value="Print"/>
<li>Needs <a href="chrome://flags/#enable-experimental-web-platform-features">Experimental Web Platform Features</a></li>
<li>Needs <a href="chrome://flags/#enable-webusb">Web USB</a></li>
var device;
View poem.js
var words = [
//concrete nouns 1
zanders3 / MeshProxy.cs
Created Apr 20, 2016
Unity Optimisation Tools
View MeshProxy.cs
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class MeshProxy
public List<Vector3> Vertices = new List<Vector3>();
public List<Vector3> Normals = new List<Vector3>();
public List<Vector2> UVs = new List<Vector2>();
public List<int> Tris = new List<int>();
zanders3 / bf.c
Last active Aug 29, 2015
A BF interpreter in C with some dumb optimisations
View bf.c
//Compile with: gcc bf.c -o bf -O3 && ./bf
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int opCount(char** pt, char v) {
int opCount = 0;
char* p = *pt;
while (*(*pt) == v) {
zanders3 / allrgb.cpp
Last active May 16, 2020
A rainbow rendering of the mandelbrot set. This created by sorting every colour by Hue, then randomly shuffling each set of pixels that share the same iteration in the fractal via histogram generation. Posted on
View allrgb.cpp
// AllRGB.cpp
// Calculates an image containing every RGB color
// once and once only in a vague mandelbrot kind of shape.
// To use:
// gcc allrgb.cpp
// ./a.out > allrgb.ppm
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
You can’t perform that action at this time.