Skip to content

Instantly share code, notes, and snippets.

@zetashift
zetashift / todo.scala
Last active October 29, 2022 15:20
wooo
//> using scala "3.2"
//> using lib "org.http4s::http4s-dsl:1.0.0-M29"
//> using lib "org.http4s::http4s-ember-server:1.0.0-M29"
//> using lib "org.http4s::http4s-ember-client:1.0.0-M29"
//> using lib "org.http4s::http4s-circe:1.0.0-M29"
//> using lib "ch.qos.logback:logback-classic:1.2.6"
package zetashift.todo
import cats.effect._
@zetashift
zetashift / example.md
Created March 11, 2023 20:43
Websocket Scala

Using Websockets

def sendInput(input: html.Input, socket: WebSocket) = {
  input.onkeyup = (e: Event) => socket.send(input.value)
}

def echoWebSocket(input: html.Input, pre: html.Pre) = {
  val echo = "ws://echo.websocket.events"
@zetashift
zetashift / SvelteKitTypeScriptProject.ts
Last active April 27, 2023 19:54
A SvelteKit projen based off of NextJS (WIP)
/* eslint-disable import/no-extraneous-dependencies */
import {
NodeProjectOptions,
TypeScriptModuleResolution,
} from "projen/lib/javascript";
import {
TypeScriptAppProject,
TypeScriptProjectOptions,
} from "projen/lib/typescript";
import { deepMerge } from "projen/lib/util";
@zetashift
zetashift / highlights.scm
Created July 14, 2023 12:48
Unison WIP highlights
;; Primitives
(comment) @comment
(nat) @constant.numeric
(unit) @constant.builtin
(literal_char) @constant.character
(literal_text) @string
(literal_boolean) @constant.builtin.boolean
;; Keywords
[
;;; unison-ts-mode.el --- Major mode for Unison with tree-sitter support -*- lexical-binding: t; -*-
(require 'treesit)
(require 'rx)
(declare-function treesit-parser-create "treesit.c")
(declare-function treesit-node-type "treesit.c")
(declare-function treesit-node-text "treesit.c")
(declare-function treesit-node-child-by-field-name "treesit.c")
(declare-function treesit-parent-while "treesit.c")