Skip to content

Instantly share code, notes, and snippets.

@paularmstrong
paularmstrong / index.html
Created November 24, 2012 03:35
Spritesheet animation tester
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Sprite Animation Tester</title>
<style type="text/css">
* {
@jpattishall
jpattishall / TouchTimerWorkaround.js
Last active September 1, 2022 07:58
setTimeout workaround for iPad and iOS6
/**
Workaround for iOS 6 setTimeout bug using requestAnimationFrame to simulate timers during Touch/Gesture-based events
Author: Jack Pattishall (jpattishall@gmail.com)
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 https://gist.github.com/ronkorving/3755461 for a potential workaround.
Usage: Pass TRUE as the final argument for setTimeout or setInterval.
@jaydenseric
jaydenseric / ffmpeg-web-video-guide.md
Last active February 17, 2024 23:49
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

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

Command basics

@LotteMakesStuff
LotteMakesStuff / TrafficLightAttribute.cs
Last active February 2, 2024 15:58
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.
// 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;
@2DArray
2DArray / fluid_sim_pico8.lua
Created May 5, 2018 01:26
Pico8 Fluid Sim
fluid={}
poke(0x5f2d,1)
function spawndrop(x,y)
// {x, y, old_x, old_y, hit_count}
add(fluid,{x,y,x,y,1})
end
function sortfluid()
for i=2,#fluid do

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

@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#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