Skip to content

Instantly share code, notes, and snippets.

View RemyPorter's full-sized avatar

Remy Porter RemyPorter

View GitHub Profile
@RemyPorter
RemyPorter / poggers.js
Created September 30, 2021 19:53
Replace all references to NFTs with references to POGs on all websites
// ==UserScript==
// @name Poggers
// @desc Replace references to "NFTs" with references to "POGs"
// @grant none
// @match *://*/*
// @version 1.0
// ==/UserScript==
var replaceArry = [
[/\bNFT(s)?\b/gi, function(match, plural) {
return plural ? "POGs" : "POG"
@RemyPorter
RemyPorter / attractive.py
Last active July 8, 2021 12:52
Inspired by playing around with attractors (https://github.com/RemyPorter/AttractiveToy), I decided to map that onto a wildly different vector space- language. This is a "fractal" poetry generator, which leaps through vector space to construct its poetry
"""
This uses the chaos-game algorithm to generate a sierpinski-gasket type pattern, but applies that pattern to wordspace.
Each word is a vector (in `-f`ull mode, that's 300 dimensions). Starting with a random position in that space,
this randomly moves the tracepoint towards one of your targets, based on the `-l`erp distance. Rinse, repeat.
The result is strangely structured, but also grammarless output.
You'll need to pip install gensim and numpy
"""
@RemyPorter
RemyPorter / cga-gen.pde
Last active April 12, 2021 18:09
A math-y CGA generator. Use lots of bitwise operations in `f`, use `p` and `d` to convert to polar coordinates.
boolean save = true //set to false while prototyping
int palettes[][] = {
{#000000, #00AA00, #AA0000, #AA5500},
{#000000, #55FF55, #FF5555, #FFFF55},
{#000000, #00AAAA, #AA00AA, #AAAAAA},
{#000000, #55FFFF, #FF55FF, #FFFFFF},
{#000000, #00AAAA, #AA0000, #AAAAAA},
{#000000, #55FFFF, #FF5555, #FFFFFF}
};
@RemyPorter
RemyPorter / farm.py
Last active February 26, 2021 16:50
Quick/Dirty script to sync local .project/.path files with finger.farm. Depends on `requests`.
# Save your Finger.Farm token in ~/.fingerfarm/token
# Update your .plan/.project files as you like, then run this
# requires `requests` installed, no I'm not bothing with a requriements file
import json
import requests
from pathlib import Path
with open(Path.home() / Path(".plan"), "r") as p:
plan = p.read()
@RemyPorter
RemyPorter / Orbital.pde
Last active July 14, 2020 15:08
A simple version of the Visual Phaser for Gisting Purposes
float FR = 60;
float SPEED = 2;
float STEP = 20;
float R = 40;
float DOT_SIZE = 4;
boolean RECORD = false;
boolean DRAW_CIRCLES = true;
float phase(float x, float y) {
@RemyPorter
RemyPorter / ruleconfig.pde
Created April 21, 2020 21:54
Just an interesting rule config for VisualPhaser
sim = builder(15, 3.3, 1)
.rule(new RuleStep() {
public float f(float x, float y, PhaseField field) {
return (x * 1.6 - y * 0.9) * sin(field.dc(x, y)/(width+height)*8*PI) * 0.01 + PI;
}
}, 1)
.rule(new RuleStep() {
public float f(float x, float y, PhaseField field) {
return pow(x*x+y*y, 0.5);
}
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
class Pathicle {
public Pathicle(PVector o, float r, float s, float p) {
origin = o;
phase = p;
radius = r;
speed = s;
//https://imgur.com/a/kdwZa38
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
PostFX fx;
final int EMPTY = 0;
final int CELL = 1;
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
PostFX fx;
final int EMPTY = 0;
final int CELL = 1;
final int DECAY = 2;
final int RELAPSE = 3;
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
PostFX fx;
final int EMPTY = 0;
final int CELL = 1;
final int DECAY = 2;
final int RELAPSE = 3;