Skip to content

Instantly share code, notes, and snippets.

Alex Parker zanders3

Block or report user

Report or block zanders3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zanders3
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
<html>
<body>
<textarea id="printContent"></textarea>
<input type="submit" onclick="connectAndPrint()" value="Print"/>
<ul>
<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>
</ul>
<script>
var device;
View poem.js
//poem.js
var words = [
//concrete nouns 1
["sea","room","king","snake","star","balloon","watchman","mouth","window","square","nightgown","ear","rose","wall","night","moth","mirror","wind","hand","mother","cloud","statue","museum","shadow","echo","orange","creature","whisker",
"paw",
"hoof",
"tail",
"wing",
"antler",
"beak",
@zanders3
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
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 mandelbrot.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) {
opCount++;
@zanders3
zanders3 / allrgb.cpp
Last active Aug 29, 2015
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 http://allrgb.com/rainbow-fractal.
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.