This file contains 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
fold (\v l r -> Node v r l) Empty tree |
This file contains 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
~/code/dte (master) $ trap -l | |
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP | |
6) SIGABRT 7) SIGEMT 8) SIGFPE 9) SIGKILL 10) SIGBUS | |
11) SIGSEGV 12) SIGSYS 13) SIGPIPE 14) SIGALRM 15) SIGTERM | |
16) SIGURG 17) SIGSTOP 18) SIGTSTP 19) SIGCONT 20) SIGCHLD | |
21) SIGTTIN 22) SIGTTOU 23) SIGIO 24) SIGXCPU 25) SIGXFSZ | |
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGINFO 30) SIGUSR1 | |
31) SIGUSR2 |
This file contains 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
FROM ubuntu:focal | |
ENV LANG en_US.UTF-8 | |
RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8 |
This file contains 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
type TokenType = 'ASSIGN' | 'NAME' | 'NUM' | 'OP'; | |
type TokenLiteral = string; | |
type Token = [TokenType, TokenLiteral]; | |
type Tokens = ReadonlyArray<Token>; | |
function assert<T extends Tokens>(actual: T, expected: T): void | never { | |
const stringActual = JSON.stringify(actual); | |
const stringExpected = JSON.stringify(expected); | |
if (stringActual !== stringExpected) { |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
if [[ $# -lt 2 ]]; then | |
>&2 echo "usage: dte-replace <search> <replacement> [rg_args]" | |
exit 1 | |
fi | |
rg "$1" --files-with-matches ${@:3} | xargs -n1 dte -c 'replace -c '$1' '$2'; save; quit' |
This file contains 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
#!/usr/bin/env bash | |
function m() { | |
local marks="$HOME/.config/m/marks" | |
local version="0.0.1" | |
# Create "$HOME/.config/m/marks" if it doesn't exist. | |
if ! [[ -f "$marks" ]]; then | |
mkdir -p "$(dirname "$marks")" | |
touch "$marks" |
This file contains 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
{ | |
"background": "#101010", | |
"colors": { | |
"activityBar.activeBorder": "#101010", | |
"activityBar.background": "#101010", | |
"activityBar.border": "#191919", | |
"activityBar.foreground": "#b4b4b4", | |
"activityBar.inactiveForeground": "#444444", | |
"activityBarBadge.background": "#626262", | |
"badge.background": "#262626", |
This file contains 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
module Day05 exposing (main) | |
import Html exposing (Html, div, strong, text) | |
import Set exposing (Set) | |
partOne : Html () | |
partOne = | |
div [] | |
[ strong [] [ text "Part 1: " ] |
This file contains 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
module Day04 exposing (main) | |
import Html exposing (Html, div, strong, text) | |
import MD5 | |
partOne : Html () | |
partOne = | |
div [] | |
[ strong [] [ text "Part 1: " ] |
This file contains 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
module Day03 exposing (main) | |
import Dict exposing (Dict) | |
import Html exposing (Html, div, strong, text) | |
partOne : Html () | |
partOne = | |
div [] | |
[ strong [] [ text "Part 1: " ] |