Skip to content

Instantly share code, notes, and snippets.

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

Adrien KISSIE Fredkiss3

🏠
Working from home
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@gtrabanco
gtrabanco / bun-sse.ts
Created November 15, 2022 15:00
Bun Server Sent Events
// bun --hot sse.ts
import { randomUUID } from "node:crypto";
import { EventEmitter } from "node:events";
const sseEvents = new EventEmitter();
export const sse = (data) => {
sseEvents.emit(
"sse",
`id: ${randomUUID()}\ndata: ${JSON.stringify(data)}\n\n`
@lubieowoce
lubieowoce / babel-plugin-inline-actions.cjs
Last active October 28, 2023 22:07
a naive and WIP babel transform for inline "use server" closures
// @ts-check
/* eslint-disable @typescript-eslint/no-var-requires */
const { declare: declarePlugin } = require("@babel/helper-plugin-utils");
const { addNamed } = require("@babel/helper-module-imports");
const crypto = require("node:crypto");
const { pathToFileURL } = require("node:url");
// TODO: handle inline actions calling each other...? sounds tricky...