Skip to content

Instantly share code, notes, and snippets.

@6r1d
6r1d / build-failure-aur ladybird 20241006-1.txt
Created November 29, 2024 07:43
Ladybird browser build failures, Linux 6.12.1-arch1-1, Fri, 29 Nov 2024
yay ladybird
2 aur/ladybird-git r64004.5056bda0439-1 (+12 0.84) (Out-of-date: 2024-11-27)
Truly independent web browser
1 aur/ladybird 20241006-1 (+23 4.34)
Truly independent web browser
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
AUR Explicit (1): ladybird-20241006-1
Sync Make Dependency (2): autoconf-archive-1:2024.10.16-1, nasm-2.16.03-1
:: PKGBUILD up to date, skipping download: ladybird
yay ladybird
2 aur/ladybird-git r64004.5056bda0439-1 (+12 0.84) (Out-of-date: 2024-11-27)
Truly independent web browser
1 aur/ladybird 20241006-1 (+23 4.34)
Truly independent web browser
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
AUR Explicit (1): ladybird-20241006-1
Sync Make Dependency (2): autoconf-archive-1:2024.10.16-1, nasm-2.16.03-1
:: PKGBUILD up to date, skipping download: ladybird
@6r1d
6r1d / Buildlog_cargo_install.md
Last active May 7, 2024 17:12
Tinydancer buildlog

Building using cargo install --git https://github.com/tinydancer-io/half-baked-client tinydancer.

    Updating git repository `https://github.com/tinydancer-io/half-baked-client`
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
  Installing tinydancer v0.0.8 (https://github.com/tinydancer-io/half-baked-client#5901b6a4)
    Updating crates.io index
@6r1d
6r1d / background.js
Last active June 20, 2021 01:23
A tiny TTS interface
chrome.runtime.onInstalled.addListener(function() {
chrome.contextMenus.create({
"title": 'Read "%s"',
"contexts": ["selection"],
"id": "ReadTTS"
});
})
let readText = function(info) {
console.log({
trending on artstation | 110
HDR | 110
vray | 104
CGI | 97
DSLR | 71
hyperrealistic | 66
unreal engine | 47
VFX | 45
light transport sharpening | 40
transparent | 31

Recently, I needed SVG smoothing code. I looked at a demo here by netsi1964 and all credits to the code go to him: I only want to trim the code down for the later use.

Note: it is limited to smoothing PATH elements which uses only the L and M line types. Something you can generate with:

function points_to_z(points) {
    z = ""
    z += `M ${points[0][0]} ${points[0][1]} `
 points.slice(1).forEach(function(point) {
// A fork of https://www.shadertoy.com/view/MtX3Ws
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// Created by S. Guillitte 2015
float zoom=1.5;
vec2 cmul( vec2 a, vec2 b ) { return vec2( a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x ); }
vec2 csqr( vec2 a ) { return vec2( a.x*a.x - a.y*a.y, 2.*a.x*a.y ); }
@6r1d
6r1d / Makefile
Last active January 17, 2021 02:44
Libsoundio + Polyphony
CFLAGS = -Wall -std=gnu11
LDFLAGS = -lm -lsoundio
all:
$(CC) $(CFLAGS) *.c -o main $(LDFLAGS)
@6r1d
6r1d / conf
Created December 18, 2020 12:40
Lighttpd config file for Emscripten
# Lighttpd configuration I am using with Emscripten.
#
# Probably there is a better solution
# and I am doing everything wrong.
#
# Start with:
# lighttpd -D -f lighttpd.conf
server.modules += ( "mod_setenv" )
@6r1d
6r1d / split_midi.py
Last active June 10, 2020 14:54
A test music21 program to split a MIDI file into melodies.
"""
This program breaks a MIDI file to a number of melodies.
"""
from os import getcwd, listdir
from os.path import join as path_join, splitext, abspath
from music21 import midi, stream, instrument, key, meter, note, tempo
from pathlib import Path
INPUT_DIR = abspath(path_join(getcwd(), "in"))