Skip to content

Instantly share code, notes, and snippets.

@solsarratea
solsarratea / fractals.glsl
Created March 27, 2020 17:26
Raymarching Mandelbulb in Kodelife
uniform float time;
uniform vec2 resolution;
uniform vec3 spectrum;
uniform sampler2D texture0;
out vec4 fragColor;
#define PHI (sqrt(5)*0.5 + 0.5)
//Color function
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
@thecodewarrior
thecodewarrior / App Icon Template.svg
Last active June 5, 2025 05:39
An SVG template for creating macOS app icons, including guides and the standard drop shadow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xcv58
xcv58 / copy-phab-title.js
Last active August 5, 2021 17:36
copy phab title with rich text
const copySelectedPhabs = () => {
let selection = window.getSelection();
if (selection.rangeCount <= 0) {
return
}
const div = document.createElement('div')
Array.from(document.querySelectorAll('.phui-oi-frame'))
.filter(el => selection.containsNode(el, true))
.forEach(el => {
const tmp = el.cloneNode(true)
@xarvh
xarvh / elm-format-hack
Created June 1, 2021 12:15
A wrapper for elm-format to nicely indent chained `andThen`s (ie, pseudo do-notation)
#!/usr/bin/env node
// A work around to https://github.com/avh4/elm-format/issues/352
// * Use it in place of elm-format (only some flags are supported)
// * Run it from a directory containing node_modules/elm-format/bin/elm-format (but you can change it below)
function extractFirstRegexMatch(regex, elmCode) {
@pesterhazy
pesterhazy / building-sync-systems.md
Last active July 12, 2025 00:44
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles