Skip to content

Instantly share code, notes, and snippets.

@SMUsamaShah
SMUsamaShah / List of in-browser VMs.md
Last active November 8, 2024 21:47
List of Javascript based virtual machines running in browser
{
"window.zoomLevel": 0,
"diffEditor.ignoreTrimWhitespace": false,
"editor.fontFamily": "Victor Mono",
"editor.fontLigatures": true,
"workbench.colorTheme": "SynthWave '84",
"synthwave84.brightness": "1.5",
"editor.tokenColorCustomizations": {
"textMateRules": [
{

Usage

node compile-html.cjs in.html out.html
@mattdesl
mattdesl / prompt-1.txt
Last active August 5, 2020 02:02
prompts for GPT3 / AIDungeon to generate Pantone Color of the Year 2021
Since 2000, the Pantone Color Institute has declared a particular color "Color of the Year". Twice a year the company hosts, in a European capital, a secret meeting of representatives from various nations' color standards groups. After two days of presentations and debate, they choose a color for the following year; for example, the color for summer 2013 was chosen in London in the spring of 2012.
Below is a list of all the winning "Colors of the Year" and their corresponding hex codes, from the year 2000 to 2050.
2000
Cerulean
#9BB7D4
2001
Fuchsia Rose
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@xem
xem / JSGameFramework2020.html
Last active November 11, 2023 19:53
JS game framework 2020
<body style=margin:0>
<canvas id=a>
<script>
// initialize 2D canvas (c)
// initialize game state (s)
// initialize keys states (u,r,d,l for directions, k for all the keyboard)
c=a.getContext`2d`,k=[u=r=d=l=s=0]
// (initialize your global variables here)
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active October 24, 2024 16:16
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@tbranyen
tbranyen / events.js
Last active May 10, 2024 14:54
Rethinking events using ES6 (https://tbranyen.com/events)
const bus = {};
const get = e => (bus[e] = bus[e] || new Set());
export const listeners = new Proxy(bus, { get });
export const emit = (e, ...args) => listeners[e].forEach(fn => fn(...args));
@adam-cowley
adam-cowley / index.js
Created March 2, 2018 16:24
Neo4j Driver as an Express Middleware
// Create an express app
const express = require('express');
const app = express();
// Tell it to use Neo4j middleware
app.use(require('./neo4j'));
// Example Route
app.get('/', (req, res) => {
// Create Driver session
@bellbind
bellbind / index.html
Last active March 30, 2023 22:25
[threejs] simplified gltf2 loader example
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/three"></script>
<script
src="https://unpkg.com/three/examples/js/loaders/GLTF2Loader.js"
></script>
<script src="script.js" defer="defer"></script>
</head>