Skip to content

Instantly share code, notes, and snippets.

@vlandham
vlandham / part1.md
Last active March 21, 2024 12:57
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master
@yiwenl
yiwenl / bezier.glsl
Last active June 10, 2024 10:55
Bezier curve in GLSL
// bezier curve with 2 control points
// A is the starting point, B, C are the control points, D is the destination
// t from 0 ~ 1
vec3 bezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) {
vec3 E = mix(A, B, t);
vec3 F = mix(B, C, t);
vec3 G = mix(C, D, t);
vec3 H = mix(E, F, t);
vec3 I = mix(F, G, t);
@akella
akella / setup.md
Last active July 10, 2024 14:46
My Setup
@kmelve
kmelve / department.js
Created April 15, 2020 07:35
Example of listing documents in Sanity Studio‘s desk structure with real-time listener
export default {
name: 'department',
type: 'document',
title: 'Department',
fields: [
{
name: 'title',
type: 'string',
title: 'Title',
},
@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@kmelve
kmelve / blurhash.js
Last active July 22, 2023 14:29
Retroactively add Blurhash strings to image assets in your Sanity Content Lake.
/**
* Retroactively add Blurhash strings to image assets in your Sanity Content Lake.
* 1. yarn add got sharp blurhash
* 2. run sanity exec blurhash --with-user-token
* 3. repeat (patches 100 assets in 1 transaction pr run)
*
* Some images might take a while to process.
*/
import client from 'part:@sanity/base/client'
import got from 'got'
@kenianbei
kenianbei / adobe-sucks.sh
Created February 11, 2022 02:49
Kill Adobe Bloat (Mac)
#!/bin/bash
PROCESSES=(
'ACCFinderSync'
'Adobe_CCXProcess'
'AdobeIPCBroker'
'Adobe Desktop Service'
'CrashHandler'
'AdobeCRDaemon'
'Creative Cloud Helper'
@praskoson
praskoson / select.tsx
Created March 19, 2023 20:26
Reusable Select Component using Headless-UI & Tailwind
import {
Transition,
Listbox,
type ListboxProps,
type ListboxOptionsProps,
type ListboxOptionProps,
} from "@headlessui/react";
import clsx from "clsx";
import React from "react";
import { twMerge } from "tailwind-merge";
@BLamy
BLamy / NFLScoresPrompt.ts
Last active June 15, 2023 23:07
An Example of file that functions as both a typescript module and a GPT4 prompt.
// You will function as a JSON api.
// The user will feed you valid JSON and you will return valid JSON, do not add any extra characters to the output that would make your output invalid JSON.
// The end of this system message will contain a typescript file that exports 5 types:
// Prompt - String literal will use double curly braces to denote a variable.
// Input - The data the user feeds you must strictly match this type.
// Output - The data you return to the user must strictly match this type.
// Errors - A union type that you will classify any errors you encounter into.
// Tools - If you do not know the answer, Do not make anything up, Use a tool. To use a tool pick one from the Tools union and print a valid json object in that format.