Skip to content

Instantly share code, notes, and snippets.

@zzandy
zzandy / halftone.html
Last active November 2, 2016 14:07
removed some unused code, some formatting
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Halftone</title>
</head>
<body style="background:white">
<script type="text/javascript">
@zzandy
zzandy / fjords.html
Last active August 29, 2015 14:22
15 cards generating, most will have two variations
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<script type="text/javascript">
function makeCanvas(w, h) {
@zzandy
zzandy / black-on-grey-text.vssettings
Last active March 9, 2016 09:28
Black on Grey VisualStudio color theme
<UserSettings><ApplicationIdentity version="12.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"/></ToolsOptions><Category name="Environment_Group" RegisteredName="Environment_Group"><Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"><PropertyValue name="Version">2</PropertyValue><FontsAndColors Version="2.0"><Theme Id="{FA3959C2-3B5B-4CBF-9336-5495186412F8}"/><Categories><Category GUID="{58E96763-1D3B-4E05-B6BA-FF7115FD0B7B}" FontIsDefault="Yes"><Items><Item Name="Plain Text" Foreground="0x00000000" Background="0x008A8A8A" BoldFont="No"/><Item Name="Selected Text" Foreground="0x02000000" Background="0x009FC2C6" BoldFont="No"/><Item Name="Inactive Selected Text" Foreground="0x02000000" Background="0x00DBCDBF" BoldFont="No"/><Item Name="Indicator Margin" Foreground="0x02000000" Background="0x
interface INameSource{
getName():string;
}
class EnglishisNameSource implements INameSource
{
private prefix:string[]=[];
private suffix:string[]=[];
private recent:string[] = [];
@zzandy
zzandy / metaballs.html
Last active May 19, 2016 10:12
Metaballs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Metaballs</title>
<style type="text/css">
html, body {
background-color: #232220;
color: #dad6d0;
}
</style>
public class Random{
constructor(private seed: number = (new Date()).getTime()){}
public Next(): number{
return this.seed = +('0.'+Math.sin(this.seed).toString().substr(6));
}
public iNext(min, max):number{
return (min + (max-min)*this.Next())|0;
}
@zzandy
zzandy / hexfiller.html
Last active June 23, 2016 11:36
fps counting
<!DOCTYPE html>
<html>
<head>
<title>---</title>
<style type="text/css">
html, body {
background-color: #262626;
}
</style>
</head>
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
(function(global){
'use strict';
global.fullscreenCanvas = function() {
Func<int, bool> even = (n) => {
Cоnsole.WriteLine("Test " + n);
return n % 2 == 0;
};
Consоle.WriteLine("Checkpoint #0");
var items = frоm n in new[]{0,1,2,3}
where even(n)
select n*10;
class Program {
private static string result;
static void Main() {
SaySomething();
Console.WriteLine(result);
}
static async Task<string> SaySomething() {
await Task.Delay(5);