Skip to content

Instantly share code, notes, and snippets.

View sketchpunk's full-sized avatar
🏠
Working from home

Pedro sketchpunk

🏠
Working from home
View GitHub Profile
@sketchpunk
sketchpunk / symbols.txt
Created April 24, 2026 19:17
Asciii Symbol
▲ ▼ ◀ ▶ ⬡ ⬢ △ ▽ ◁ ▷ ⮝ ⮟ ⮜ ⮞ ↶ ↷ ↺ ↻ ︿ ﹀ ˄ ˅ ‹ › 〈 〉 ▴ ▾ ◂ ▸
⭗ ⯎ ⯏ ⬖ ⬗ ⬘ ⬙ ⬚ ◇ ◆ ◈ ⋄ ⬦ ⬥ ◌ ◎ ◍ ◙ ◐ ◑ ◒ ◓ ◔ ◕ ▢ ▣ ▤ ▥ ▦ ◘ ◙ ◚ ◛
@sketchpunk
sketchpunk / git_cheatsheet.md
Created April 8, 2026 20:32
GIT Cheat Sheet

GIT Cheat Sheet

BRANCHES

Get List
git branch --list

Local & Remote List
git branch -a

@sketchpunk
sketchpunk / Ubo.js
Created February 13, 2026 02:30
Ubo object that handles STD140 layouts, single buffer, type array views wrapped in a proxy.
/*
const ubo = new Ubo([
{ name:'time', type:GTYPE.f32, init:22 },
{ name:'num', type:GTYPE.f32, init:100 },
{ name:'vec', type:GTYPE.vec3, init:[1,2,3] },
]);
ubo.time = 999;
ubo.vec = [5,6,7];
@sketchpunk
sketchpunk / shopify_os_alt.md
Last active January 8, 2026 23:19
Shopify Opensource Alternatives

Shopify Open Source Alternatives

General Idea

Find & Pick an opensource project that provides same or similar features to shopify. Learn the method of how to self host which ever solution is picked. Be it regular web hosting or some sort of docker hosting.

Some of these projects also provide a hosting service. They just setup a server with the project preconfigured & ready for use. At that point you are on your own on how use the web app, they will only handle the hosting side of things. This might be a good option as long as its a good hosting service.

@sketchpunk
sketchpunk / __usage.js
Last active December 29, 2025 18:31
ThreeJS GLTFLoader - Parse out skeleton & clips
// let [clips, aSkel, aGrp] = await loadAnimations( `${url}/anim/source-animation.glb` );
// let aHelper = new THREE.SkeletonHelper( aSkel.bones[0] );
// App.scene.add( aGrp || aSkel.bones[0], aHelper );
// const mixer = new THREE.AnimationMixer( new THREE.Object3D() );
// const action = this.mixer.clipAction( clips[0], aSkel.bones[0] );
// action.play();
async function loadAnimations( url ){
const tf = await new GLTFLoader().loadAsync( url );

GIST

  • Search, user:@me searchTerm
@sketchpunk
sketchpunk / hotkeys.js
Created October 16, 2025 02:27
HotKeys
// new HotKeys().reg( 'ctrl+s', e=>console.log( 'woot' ) );
export default class HotKeys{
items = [];
constructor(){ window.addEventListener( 'keydown', this.onKeyDown ); }
dispose(){ window.removeEventListener( 'keydown', this.onKeyDown ); }
reg( str, fn ){
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import * as THREE from 'three';
export default class SkyGradientMaterial extends THREE.RawShaderMaterial {
static createBox(scl = 1): THREE.Mesh {
const geo = new THREE.BoxGeometry(2, 2, 2);
const mesh = new THREE.Mesh(geo, new SkyGradientMaterial());
mesh.scale.setScalar(scl);
return mesh;
}
@sketchpunk
sketchpunk / download.js
Created September 12, 2025 04:06
Download Text / Image
function downloadText(fName: string, txt: string) {
const blob = new Blob([txt], { type: 'text/plain;charset=utf-8;' });
const url = window.URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = fName;
link.target = '_blank';
// link.click();
link.dispatchEvent(new MouseEvent('click'));