Skip to content

Instantly share code, notes, and snippets.

munificent / generate.c
Last active April 24, 2023 00:10
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u

How To Start Twitter Botting -- The Boring Parts

The boring parts of standing up a twitter bot I always forget. This guide should get you from "I got absolutely nothing" to "I posted a thing to twitter with Python!"

Here's the deal. If you make a bunch of bot accounts, and all those accounts are tied to one cell phone number, you are in for a round of API access recovation musical chairs.

To get around this, you need to create your own central twitter app. This app will in turn then be used by all your bot accounts. This app will be tied to your main account, backed by your phone number.

1. Create a Twitter Dev Account

2DArray / fluid_sim_pico8.lua
Created May 5, 2018 01:26
Pico8 Fluid Sim
View fluid_sim_pico8.lua
function spawndrop(x,y)
// {x, y, old_x, old_y, hit_count}
function sortfluid()
for i=2,#fluid do
LotteMakesStuff / TrafficLightAttribute.cs
Last active November 2, 2023 21:03
TrafficLight control/layout/property drawer: Adds a new editor control that draws lil Traffic Lights in the inspector. its really useful for visualizing state. For example, checkboxes can be hard to read at a glace, but a Red or Green status light is easy! Recommend you use the attached package, as it has all the icon image files.
View TrafficLightAttribute.cs
// Non Editor code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class TrafficLightAttribute : PropertyAttribute
public bool DrawLabel = true;
public string CustomLabel;
public bool AlsoDrawDefault;
jaydenseric /
Last active November 22, 2023 17:27
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg


On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

jpattishall / TouchTimerWorkaround.js
Last active September 1, 2022 07:58
setTimeout workaround for iPad and iOS6
View TouchTimerWorkaround.js
Workaround for iOS 6 setTimeout bug using requestAnimationFrame to simulate timers during Touch/Gesture-based events
Author: Jack Pattishall (
This code is free to use anywhere (MIT, etc.)
Note: UIWebView does not support requestAnimationFrames. If your timer is failing during a scroll event,
take a look at for a potential workaround.
Usage: Pass TRUE as the final argument for setTimeout or setInterval.
paularmstrong / index.html
Created November 24, 2012 03:35
Spritesheet animation tester
View index.html
<!doctype html>
<meta charset="utf-8">
<title>Sprite Animation Tester</title>
<style type="text/css">
* {
bzgeb / TriggerContainerEditor.cs
Created September 28, 2012 14:52
Example Drag & Drop area in a custom inspector for the Unity editor
View TriggerContainerEditor.cs
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor (typeof(TriggerContainer))]
public class TriggerContainerEditor : Editor
private SerializedObject obj;
phoboslab / touch-button.js
Last active August 10, 2021 14:44
Touch Button Plugin for Impact
View touch-button.js
.defines(function(){ "use strict";
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
View ios6-timers.js
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author:
var timeouts = {};