Skip to content

Instantly share code, notes, and snippets.

zerosalife / .block
Last active Feb 17, 2017
Scatterplot with regression line
View .block
license: cc-by-nc-sa-4.0
zerosalife /
Created Feb 6, 2016
Notes for a hexcrawl application



Example image

Notification of Map Code and URL to share

Collection of tiles

Background image?

zerosalife / LINQExample.cs
Created Oct 15, 2015
Example of using LINQ expressions to program in a functional style
View LINQExample.cs
using UnityEngine;
using System.Collections;
using System.Linq;
// Place this script on an object in your scene (e.g. the Main Camera)
// and run.
public class LINQExample: MonoBehaviour {
public void Start() {
int[] counters = new int[] {0, 1, 2, 3};
View Ball.cs
using UnityEngine;
using System.Collections;
public class Ball : MonoBehaviour {
public float maxHeight;
public float minHeight;
public float timeToReachMaxHeight;
private float jumpVelocity;
private float gravity;
zerosalife / MakeDictionaryOfLists.cs
Created Jun 20, 2015
Create a Dictionary of Lists in Unity C#
View MakeDictionaryOfLists.cs
using UnityEngine;
using System.Collections.Generic;
public class MakeDictionaryOfLists : MonoBehaviour {
Dictionary<string, List<int>> table = new Dictionary<string, List<int>>();
void Start() {
// Fill our table with Lists containing ints using Arrays to intialize
// the Lists.
table["a"] = new List<int>(){1};
zerosalife / MakeDictionaryOfLists.js
Created Jun 6, 2015
Create a Dictionary of Lists in Unity JavaScript
View MakeDictionaryOfLists.js
#pragma strict
import System.Collections.Generic;
// White space matters.
var table:Dictionary.<String,List.<int> > = new Dictionary.<String,List.<int> >();
// Fill our table with Lists containing ints using Arrays to intialize
// the Lists.
table["a"] = new List.<int>([1]);
table["b"] = new List.<int>([2]);
zerosalife / gist:53308e64bb5ba273d428
Created Jan 13, 2015
Draft of a blog post about video game book clubs
View gist:53308e64bb5ba273d428

Book Club



You, your friends, the cat (If you have one. No catnapping.), anyone with interest in critically discussing video games


View SimplePlane.js
#pragma strict
var size: float;
function Awake() {
var m: Mesh = CreateBoxMesh(size);
var obj: GameObject = CreateGameObject();
// Attach Mesh `m' to the GameObject `obj'.
obj.GetComponent(MeshFilter).mesh = m;
View GameController.cs
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
public class GameController: MonoBehaviour {
public static GameController control;
public int experiencePoints;
zerosalife / Custom.mac-kb.xml
Created Feb 19, 2014
An emacs-like key binding scheme for MonoDevelop.
View Custom.mac-kb.xml
<schemes version="1.0">
<scheme name="current">
<binding command="MonoDevelop.Ide.Commands.EditCommands.Copy" shortcut="Alt+W" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.Cut" shortcut="Control+W" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.IndentSelection" shortcut="Control+X|Tab" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" shortcut="Control+X|Control+L" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.Paste" shortcut="Control+Y" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.Redo" shortcut="" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.SelectAll" shortcut="Control+X|H" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.Undo" shortcut="Control+_" />
You can’t perform that action at this time.