Skip to content

Instantly share code, notes, and snippets.

View Lulzx's full-sized avatar
👀
69 people are currently looking at this profile

Lulzx Lulzx

👀
69 people are currently looking at this profile
View GitHub Profile
@Lulzx
Lulzx / cf-workers-ai-bge-small.js
Created January 29, 2024 19:11 — forked from charlesteh/cf-workers-ai-bge-small.js
Cloudflare Workers AI baai/bge-small deployment script
// Made by @charlestehio: https://x.com/charlestehio
// Usage: https://abc.workers.dev/?query=your%20embedding%20query
import { Ai } from './vendor/@cloudflare/ai.js';
export default {
async fetch(request, env) {
// Parse the URL to get query parameters
const url = new URL(request.url);
var query = url.searchParams.get('query');
@Lulzx
Lulzx / fast-rough-edge-shadow.glsl
Created March 19, 2020 18:01 — forked from mattdesl/fast-rough-edge-shadow.glsl
Fast Rough-Edge Shadows Pseudocode
// Your shadow map comparison, this is builtin to ThreeJS
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
}
float getShadow () {
float texelSize = 1.0 / shadowMapPixelDimension;
float shadowStepSize = 0.5; // adjust to taste
@Lulzx
Lulzx / bret_victor-reading_list.md
Created June 14, 2019 17:52 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★