View ShipLayout.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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", |
View MeshProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
View bf.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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++; |
View allrgb.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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> |