This file contains hidden or 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
// This file created by Emma 'Eniko' Maassen | |
// Licensed under Creative Commons Attribution 3.0 Unported (CC BY 3.0) | |
// http://creativecommons.org/licenses/by/3.0/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Drawing; | |
namespace Indigo.Framework.Random { |
This file contains hidden or 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
#region License | |
/* | |
Copyright © 2014 Emma Maassen | |
This work is free. You can redistribute it and/or modify it under the | |
terms of the Do What The Fuck You Want To Public License, Version 2, | |
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
*/ | |
#endregion | |
using System; | |
using System.Collections.Generic; |
This file contains hidden or 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
This is output from the gamepad API's id property tested across a variety of browsers, along with regular expressions to | |
find the name, vendor id, and product id. | |
Chrome: Logitech Dual Action (STANDARD GAMEPAD Vendor: 046d Product: c216) | |
Xbox 360 Controller (XInput STANDARD GAMEPAD) | |
Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4) | |
Sony PLAYSTATION(R)3 Controller (STANDARD GAMEPAD Vendor: 054c Product: 0268) | |
Pro Controller (Vendor: 057e Product: 2009) | |
8Bitdo SF30 Pro (Vendor: 2dc8 Product: 6000) | |
Firefox: 046d-c216-Logitech Dual Action |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
public static class CommandLineArguments { | |
/// <summary> | |
/// Parses command line arguments. |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class P8Writer { | |
public const int RomSize = 0x4300; | |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading; | |
namespace Franca { | |
[StructLayout(LayoutKind.Explicit)] | |
public struct IncrementalID : IEquatable<IncrementalID>, IComparable<IncrementalID> { |
This file contains hidden or 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
seed = 38 | |
function txp1() | |
if seed == 1 then | |
return seed | |
elseif seed % 2 == 0 then | |
seed /= 2 | |
else | |
seed = seed * 3 + 1 | |
end |
This file contains hidden or 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
// coroutines for C adapted from Simon Tatham's coroutines | |
// https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html | |
// | |
// this implementation utilizes __VA_ARGS__ and __COUNTER__ | |
// to avoid a begin/end pair of macros. | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
// modify this if you don't like the `self->name` format |
This file contains hidden or 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
pico-8 cartridge // http://www.pico-8.com | |
version 18 | |
__lua__ | |
--[[function spline(x0,y0,x1,y1,c) | |
local dx = x1 - x0 | |
local dy = y1 - y0 | |
local step = dx/dy | |
local x = x0 - (y0 % 1) * step | |
local y = flr(y0) |
This file contains hidden or 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> | |
<head> | |
<title>Interpretoy REPL</title> | |
</head> | |
<body> | |
<script> | |
// based on lispy by Peter Norvig: http://norvig.com/lispy.html | |
function load(source) { |
OlderNewer