Skip to content

Instantly share code, notes, and snippets.

@LapisOnTheMoon
LapisOnTheMoon / FPuzzles-export-to-Sudokupad.user.js
Last active May 25, 2024 16:50
FPuzzles export to Sudokupad
// ==UserScript==
// @name F-Puzzles to CtC/Sudokupad
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Replaces screenshot button on f-puzzles export popup to export to Sven's Sudokupad/CtC web app.
// @author LapisOnTheMoon
// @match https://*.f-puzzles.com/*
// @match https://f-puzzles.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
@rvaiya
rvaiya / zip.js
Last active December 11, 2024 15:29
tinyzip.js - A tiny zip file generator in 70 lines of javascript.
// Author: Raheman Vaiya
// License: WTFPL
//
// A tiny zip generator in < 70 lines of javascript.
// Produces an uncompressed zip blob when fed an array
// of the form:
//
// [{name: 'filename', data: <Uint8Array>}]
//
// Useful for bookmarklets, don't use this in production :P.
@killroy42
killroy42 / 0.rules.js
Last active May 30, 2021 15:16
The cracking The Cryptic Fan Discord Code Golf Club
/*
Basic rules for length measurements:
- Same function name as original, but reasonably short
- Terminate in ";"
- No "var", "const", "let", etc
- Same input/output
- May make certain assumptions, for example, input is only 0-9, etc
*/
@gullyn
gullyn / flappy.html
Last active January 24, 2025 00:41
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active April 22, 2025 22:44
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@d7samurai
d7samurai / .readme.md
Last active March 19, 2025 22:39
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series:

@mattdesl
mattdesl / IceMaterial.js
Last active May 17, 2024 09:48
fast subsurface scattering in ThreeJS PBR material — see "TRANSLUCENCY" in the frag shader
const glslify = require('glslify');
const path = require('path');
const assign = require('object-assign');
const defined = require('defined');
// This is the original source, we will copy + paste it for our own GLSL
// const vertexShader = THREE.ShaderChunk.meshphysical_vert;
// const fragmentShader = THREE.ShaderChunk.meshphysical_frag;
// Our custom shaders
@LotteMakesStuff
LotteMakesStuff / StatsBarAttribute.cs
Last active January 23, 2025 01:57
StatsBar property drawer for Unity~ Add a [StatsBar] attribute to a property to make it draw a lil bar, really useful for visualizing character stats like Health or Mana.
// NOTE DONT put in an editor folder
using UnityEngine;
public class StatsBarAttribute : PropertyAttribute
{
public string valueMax;
public StatsBarColor color;
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red)
/**
* @author mrdoob / http://mrdoob.com/
*/
function html2canvas( element ) {
var range = document.createRange();
function getRect( rect ) {