Skip to content

Instantly share code, notes, and snippets.

View CharStiles's full-sized avatar

Char CharStiles

View GitHub Profile
siliconjungle / vector-db.js
Created October 15, 2023 21:59
Simple vector db embeddings.
import readline from 'readline'
import chalk from 'chalk'
import OpenAI from 'openai'
import { LocalIndex } from 'vectra'
import { fileURLToPath } from 'url'
import path, { dirname } from 'path'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
skullface / the_force_2020_5M_23D_19H_49m_32s.frag
Created May 24, 2020 01:36
what i ended up with from today’s shader workshop!
// giant circle owo
float circ(vec2 p) {
return length(p - 0.9) - 0.1;
// cycle thru color via cosine function
vec3 cosPalette( float t, vec3 a, vec3 b, vec3 c, vec3 d ) {
return a + b*cos( 6.28318*(c*t+d) );
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 )
function chat() {
buttons = document
.querySelectorAll('.conversations-quick-replies__reply button');
if (buttons) {
var idx = Math.floor(Math.random() * Math.floor(buttons.length));
function startChat(interval) {
brannondorsey /
Last active February 22, 2023 21:02
Chattervox Install Instructions

Chattervox on MacOS

Install Direwolf

The official Direwolf User Manual uses MacPorts to manage installation and dependencies. I don't particularly like MacPorts, so here are some instructions for installing Direwolf via Homebrew.

# Install Direwolf via Homebrew
brew install tdsmith/ham/direwolf
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# You can run this module directly with:
# twistd -ny emailserver.tac
A toy email server.
from functools import partial
sephirot47 / GLSL Raymarch ShaderToy tutorial and example code
Created June 29, 2015 12:28
GLSL Raymarch ShaderToy tutorial and example code
a shader executes per pixel
so every thing you see here is he function for every pixel
raymarching is in principe a function that finds the closest point to any surface in the world
then we move our point by that distance and use the same function,
the function will probably be closer to an object in the world every time
and after about 40 to 200 iterations you'll either have found an object or
missed them all into infinity
patriciogonzalezvivo /
Last active May 19, 2024 07:09
GLSL Noise Algorithms

Please consider using instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
danopia / index.html
Created April 20, 2013 06:12
nodejs collaborative editor, requires
<!doctype html>
<meta charset="utf-8">
<title>collab editing, yo</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src=""></script>
*** Cache Cloud ***
Version 0.9.0
by Daniel Vasquez
Updated: August 12, 2011
Python script that creates Maya Particle Disk Cache (PDC) files from a sequence of point cloud data, and also gives you the choice of importing a single point cloud. It could be useful with all the open source data being released from Kinect hacks or 3D scanners. You can start by playing around with Radiohead's House Of Cards data: