Skip to content

Instantly share code, notes, and snippets.

A::B is a system with 4 tokens: `A#`, `#A`, `B#` and `#B`.
An A::B program is a sequence of tokens. Example:
B# A# #B #A B#
To *compute* a program, we must rewrite neighbor tokens, using the rules:
A# #A ... becomes ... nothing
A# #B ... becomes ... #B A#
Shader "Unlit/PolyRhythmVisualizer" {
Properties {
_TimeCode ("Input Time", Float) = 0
_OuterRingFreq ("Outer Ring Frequency", Float) = 1
_InnerRingFreq ("Inner Ring Frequency", Float) = 0.922
_RingCount ("Ring Count", Int) = 35
_VibrantFreq ("Vibrant Frequency", Float) = 2
_Vibrant ("Vibrant", Range(0, 1)) = 0.5
_Decay ("Decay", Range(0, 10)) = 2
[Header(Cosine Gradiant)]
@not-ivy
not-ivy / .env
Last active July 2, 2022 20:02
mod updater rewrite in bash
# example config
MINECRAFT_VERSION="1.18.1"
FABRIC_MODS=(
# add the mod id / slug from modrinth here
)
FORGE_MODS=(
# add the mod id / slug from modrinth here
)
QUILT_MODS=(
@not-ivy
not-ivy / fetches.md
Last active February 24, 2021 17:26
Fetch tools that I collected
@not-ivy
not-ivy / themes.md
Last active November 1, 2021 06:40
color palettes that i collected
fun main() {
val snowflake = 563138570953687061 // 2019-04-03T23:11:37.924Z
println(snowflake.toInstant().prettyFormat())
}
/**
* @return an Epoch millisecond from a Discord Snowflake
* [offset] defaults to the first millisecond of 2015, or a "Discord Epoch"
*/
@zeroeightysix
zeroeightysix / BrigadierDsl.kt
Created September 9, 2020 13:48
A small kotlin DSL for brigadier
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.arguments.*
import com.mojang.brigadier.builder.ArgumentBuilder
import com.mojang.brigadier.builder.LiteralArgumentBuilder
import com.mojang.brigadier.builder.RequiredArgumentBuilder
import com.mojang.brigadier.context.CommandContext
@DslMarker
@Target(AnnotationTarget.TYPE)
annotation class BrigadierDsl
@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active October 1, 2024 15:12
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@Who23
Who23 / statify
Last active November 25, 2022 00:40
statify: a status script for spotify showing art and track info in the terminal
#!/bin/bash
# Who23 Github
# A script to display current spotify track info in a small terminal window
# this includes art, track name, and artist. All art/text centered
# BUILT TO WORK WITH MACOS, iTERM, & SPA (https://gist.github.com/Who23/8ff45f0f2c2c3ae8a95582178a5c92ec)
# for linux:
# iTerm is needed for the image display protocol, can work with another terminal if you change the image protocol to one
# supported by that terminal
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active November 13, 2024 13:53
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem