Skip to content

Instantly share code, notes, and snippets.

@dvessel
dvessel / oeshader.sh
Created January 1, 2021 18:27
Shell functions to manage OpenEmu shaders. Copy into your .zshrc file. Requires fzf. Not tested in bash.
# OpenEmu shader functions. Requires fzf.
function oeshader.search {
defaults find videoShader.openemu | grep $@
}
function oeshader.copy {
local source=`oeshader.ls ${@:-1} | fzf --header="Select source:"`
if [[ -n $source ]]; then
oeshader.search -oE "system\.[a-z0-9]*" | sort -u |
fzf -m --header="Apply settings from \"${source##*.}\"." |
@beesandbombs
beesandbombs / rgbHexes.pde
Created September 8, 2020 22:56
RGB hexes
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@git2358
git2358 / readme.md
Created July 7, 2020 20:38 — forked from josefnpat/readme.md
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.
@tomhicks
tomhicks / sweep-swoop.js
Last active December 10, 2021 10:02
Listen to your web pages
const audioCtx = new window.AudioContext();
const oscillator = audioCtx.createOscillator();
oscillator.connect(audioCtx.destination);
oscillator.type = "sine";
let numItems = 0
oscillator.frequency.setValueAtTime(
1,
audioCtx.currentTime
@tomhicks
tomhicks / plink-plonk.js
Last active July 22, 2024 09:51
Listen to your web pages
@infval
infval / qd2fds.py
Last active June 14, 2024 00:55 — forked from einstein95/qd2fds.py
Converts between QD and FDS disk images (Family Computer Disk System / Famicom)
#!/usr/bin/env python3
"""
Converts between QD and FDS disk images
"""
import struct
def create_fds_header(side_count):
return b"FDS\x1A" + bytes([side_count & 0xFF]) + bytes(11)
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@isaaclw
isaaclw / parse_download.pl
Last active September 7, 2020 03:12
Parse page (with perl) and then download everything matching a regex. #perl #download
#!/usr/bin/perl
# download a page, and then download all the files on the page according to the regular expression, and store them in the folder
use strict;
use URI::URL;
my $urlchars = "[^\'\"]";
parse("http://www.test.com/", "data-bt=\"($urlchars*?\.torrent)\"", "humble");
sub parse() {
@hsandt
hsandt / README.md
Last active September 1, 2020 03:02
PICO8 0.1.11g and 0.1.12c skip intro patches for Linux 64-bit

Patches to skip the splashscreen and logo/version display when the PICO-8 editor starts. Intended for development purpose only.

Please check the thread: https://www.lexaloffle.com/bbs/?tid=3485. It contains instructions on how to reproduce the patch for different versions and OSes.

Download one of the patches below matching your PICO-8 version, then patch your binary.

At first I didn't manage to upload binaries as raw gists, so I pasted binary dumps instead so you could convert them back to binaries with xxd reverse dump operation xxd -r my.patch.txt > my.patch.

But I managed to upload the binaries by cloning the repo and pushing the new files back, so now both the dump and raw versions of the patches are available.

[
{
"backcolor": "#C2C3C7",
"name": "PICO-8 devkit keyboard",
"author": "tobiasvl",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-G1xx"
},
[