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
var binaryFormat = { | |
name: "jRPG binary format", | |
extension: "bin", | |
write: function(map, fileName) { | |
var m = { | |
width: map.width, | |
height: map.height, | |
layers: [] | |
}; |
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
// 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 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
DEFINT A-Z | |
' this program sets 160x120 256 color VGA mode in QB1.1 | |
' downsides: qbasic drawing commands absolutely don't work correctly | |
' trick qbasic into thinking we're in VGA mode | |
SCREEN 13 | |
' set EGA mode 0Dh through int 10h in assembly | |
' this is equivalent to SCREEN 7 and using SCREEN 7 will work, but |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DoubleDabble { | |
class Program { | |
static void Main(string[] args) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- | |
Just search and replace the following tags: | |
{name} replace with your printed name (ex 'Elon Musk') | |
{image-url} replace with a 4:3 image, presumably your avatar | |
{twitter-username} replace with your twitter username (ex 'elonmusk') | |
{profile-url} replace with your mastodon profile url (ex 'https://mastodon.social/@Gargron') |
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> | |
<head> | |
<title>Interpretoy REPL</title> | |
</head> | |
<body> | |
<script> | |
// based on lispy by Peter Norvig: http://norvig.com/lispy.html | |
function load(source) { |
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
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 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 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 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; |
NewerOlder