Skip to content

Instantly share code, notes, and snippets.

View KokoDoko's full-sized avatar
🚀
Launching pixel rockets

Erik KokoDoko

🚀
Launching pixel rockets
View GitHub Profile
@dikarel
dikarel / ml5.d.ts
Last active November 23, 2023 07:25
ml5.js TypeScript definitions draft
// Not quite there yet, but better than nothing
// TODO: JSDoc, based on website documentation
// TODO: Interface/class types for each of these ML algorithm instances
// TODO: Break this apart into multiple files for readability
// TODO: Test autocomplete in a vanilla JS project
// TODO: Test autocomplete in a TypeScript project
import { MediaElement } from "p5";
export as namespace ml5;
@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active May 18, 2024 01:09
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@k33g
k33g / gist:3959903
Created October 26, 2012 16:57
Patterns & Typescript

##The Singleton Pattern

class SantaClaus {

	private static uniqueInstance : SantaClaus;