Skip to content

Instantly share code, notes, and snippets.

View asumagic's full-sized avatar
💭
Waiting for something to happen?

asu asumagic

💭
Waiting for something to happen?
View GitHub Profile
@0xabad1dea
0xabad1dea / speedrunning-faq.md
Last active February 26, 2024 17:42
Speedrunning FAQ/Glossary

Speedrunning FAQ/Glossary

by 0xabad1dea September 2018

You may notice a decidedly Nintendo bias to the examples. I can't change who I am.

What is Speedrunning?

Speedrunning is:

  • Completing a video game

A primer on x86 assembly with GNU assembler

When it comes to assembly language, it isn't as hard as many people think. Fundamentally, you write short, human-readable commands for the processor to execute (your assembly code) and then use a tool (the actual assembler) to translate your code into machine-readable binary instructions. Unlike high-level languages, assembly language is very simple and doesn't have that many features. The difficulty is to deal with memory and build more complex flows (e.g. loops or I/O) from the simple primitives that the assembly language gives you.

Registers and instructions

CPUs usually have small, very fast storage available for the data that is used in its instructions. This kind of storage is much smaller but also much faster than the RAM and is called registers. An x86 processor has a bunch of them to store generic data, manage the stack, keep track of the current instruction and other administrative inform

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@josefnpat
josefnpat / readme.md
Last active April 7, 2024 11:39
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@robinsloan
robinsloan / langoliers.rb
Last active April 7, 2024 13:22
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"