This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load .env inline: | |
env $(cat .env | xargs) mix release | |
sqlite ls tables: | |
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public’; | |
SELECT * FROM sqlite_master where type='table'; -- d1 ok | |
PRAGMA table_info(table_name); | |
postgres ls tables: | |
SELECT * FROM pg_catalog.pg_tables WHERE schemaname='public'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(provide (all-defined-out)) | |
(define any? any/c) | |
(define (until p f) | |
(define (go x) | |
(match x | |
[(? p x) x] | |
[_ (go (f x))])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Relation.Binary.PropositionalEquality as Eq | |
open Eq using (_≡_; refl; cong; sym) | |
open import Data.Nat | |
open import Data.Bool.Base | |
data Tree : Set where | |
tempty : Tree | |
tnode : ℕ -> Tree -> Tree -> Tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Relation.Binary.PropositionalEquality as Eq | |
open Eq using (_≡_; refl) | |
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) | |
data ℕ : Set where | |
zero : ℕ | |
suc : ℕ → ℕ | |
{-# BUILTIN NATURAL ℕ #-} |
OlderNewer