Skip to content

Instantly share code, notes, and snippets.

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

Chien Tran chientrm

🏠
Working from home
View GitHub Profile
@chientrm
chientrm / worker.js
Last active October 3, 2022 17:11
Sample CF Worker
const
_ = {
author : 'chientrm',
title : 'TODO list with CF Worker',
description : 'This project is done via quick edit only',
year : '2022',
keywords : 'cloudflare, worker, quick, edit',
license : 'MIT',
},
_________________________CONSTANTS_____________________________=_,
{
...
"scripts": {
...
"dist": "npm run build && node esbuild.js",
...
},
"type": "module"
}
import { build } from 'esbuild';
build({
entryPoints: ['./index.js'],
bundle: true,
minify: true,
outfile: './build/index.js',
format: 'esm',
platform: 'node',
external: ['./handler.js'],
import express from 'express';
import { handler } from './handler.js';
const app = express();
app.get('/healthcheck', (_, res) => res.send('ok'));
app.use(handler);
app.listen(3001);
@chientrm
chientrm / gist:5be2812ae38208390cf60114bbfc1d75
Created June 17, 2022 12:08
init svelte project with express and esbuild
npm init svelte
npm install -D express esbuild
@chientrm
chientrm / j3d_exporter.py
Last active January 6, 2022 06:05
Export blender model with texture to a single json file - Blender 3.0
import os
import bpy
import json
import base64
bl_info = {
"name": "json exporter",
"blender": (2, 80, 0),
"author": "Chien Tran",
"category": "Import-Export",