Skip to content

Instantly share code, notes, and snippets.

@khalidx
khalidx / node-typescript-esm.md
Last active May 8, 2024 07:58
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@varunshenoy
varunshenoy / photoshop_gpt.py
Created June 21, 2023 01:28
PhotoshopGPT: Describe photo edits in natural language (via a prompt) and automatically apply corresponding enhancements using a combination of Instagram filters and PIL functions.
from opendream import opendream
from opendream.layer import Layer, ImageLayer, MaskLayer
import openai
import os
import json
from PIL import Image, ImageEnhance, ImageFilter
import pilgram
@opendream.define_op