Skip to content

Instantly share code, notes, and snippets.

@kyldvs
kyldvs / extract.rs
Last active April 14, 2024 14:04
Axum Json Errors
use axum::{
async_trait,
extract::{
FromRequest,
FromRequestParts,
},
http::{
request::Parts,
StatusCode,
},
# Mouse support
set -g mouse on
# Set prefix to Ctrl-Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Ctrl-j/k to swap windows.
bind -n C-J previous-window
@kyldvs
kyldvs / join.ts
Last active February 15, 2024 17:28
join on fields between convex tables
import { DataModel, Doc, Id, TableNames } from "./_generated/dataModel";
import { GenericDatabaseReader, GenericDatabaseWriter } from "convex/server";
type Database =
| GenericDatabaseReader<DataModel>
| GenericDatabaseWriter<DataModel>;
type DocWithId<
Table extends TableNames,
info esy build 0.5.6 (using package.json)
info building reason-fontkit@2.4.1@d41d8cd9
error: build failed with exit code: 1
build log:
# esy-build-package: building: reason-fontkit@2.4.1
# esy-build-package: pwd: /Users/kad/.esy/source/i/reason_fontkit__2.4.1__62b9ec9c
# esy-build-package: running: 'dune' 'build' '--root' '.'
ocamlopt src/fontkit.cmxs (exit 2)
(cd /Users/kad/.esy/3_____________________________________________________________________/b/reason_fontkit-2.4.1-d053e44e/default && /Users/kad/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-e5a2754f/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -shared -linkall -I src -o src/fontkit.cmxs src/fontkit.cmxa)
ld: warning: directory not found for option '-L/opt/local/lib'

Test

  • No indent
    • One indent
      • Two indent
        • Three indent
          • Four indent
            • Five indent
test("Basic Table", ({expect}) => {
let actual =
<Format>
<Table
borderStyle=SimpleLines
columns=[
<ColumnConfig width=8 />,
<ColumnConfig width=16 />,
<ColumnConfig width=8 />,
]>
info esy build 0.3.4
info building esy-harfbuzz@1.9.0001: starting
info building esy-freetype2@2.9.1001: starting
info building reason-glfw@3.2.1002: starting
error: build failed
build log:
# esy-build-package: building: reason-glfw@3.2.1002
# esy-build-package: running: 'make' 'build-glfw' 'ROOTDIR=/home/kad/.esy/3______________________________________________________________________/b/reason_glfw-3.2.1002-cc7ebf59'
echo Library: /home/kad/.esy/3______________________________________________________________________/b/reason_glfw-3.2.1002-cc7ebf59/_build/glfw/src
Library: /home/kad/.esy/3______________________________________________________________________/b/reason_glfw-3.2.1002-cc7ebf59/_build/glfw/src
# 0.14 frontend - input
[ "protocol", "version", 3 ]
# 0.14 Mconfig - normalize
{
"ocaml": {
"include_dirs": [],
"no_std_include": false,
"unsafe": false,
"classic": false,
"principal": false,
@kyldvs
kyldvs / Test.re
Created August 17, 2018 06:02
Test importing into sketch
let a = 1;
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* See: https://github.com/chalk/ansi-styles
*/
module IntMap =
Map.Make(
{
type t = int;
let compare = compare;