<leader>-e
open tree<leader>-f
find file by name<leader>-/
find text
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
port module Effects exposing (Effect(..), toCmd) | |
import Api | |
import Browser.Dom as Dom | |
import Browser.Navigation as Nav | |
import Date exposing (Date) | |
import Json.Encode as JE | |
import Task | |
Web Assembly can make use of OS capabilities with the Web Assembly System Interface. It allows calls to OS functionality like clock, fs, network etc.
- WASM is the fourth W3C web standard next to HTML, CSS and JS
- WASI is an additional spec that standardizes how Web Assembly can do more than just run in a sandboxed environment but interact with system resources.
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
rg --files-with-matches 'foo' | xargs -L 1 -o vim -c '%s/foo/bar/gc' |
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
{ while :; do echo test; sleep 5; done } | node -e 'process.stdin.on("data", () => process.stdout.write("Peter"))' |
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 sh | |
# this script will modify your environment | |
# so that you can work in the context of an assumed role in AWS | |
set -u | |
if [ -z ${ASSUME_ROLE_ARN+x} ] | |
then | |
echo "NO ASSUME_ROLE_ARN variable configured in Environment."; |
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 sh | |
set -eu | |
# checking input | |
[ -z ${1:-} ] && echo "Missing directory name. Call this script with a directory name you want to create." && exit 1; | |
DIR=$1 | |
[ -d $DIR ] && echo "Directory ${DIR} already exists. I need a fresh directory." && exit 1; | |
# scaffolding of dirs and files |
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
# MANUAL RUN | |
git checkout <KNOWN_BAD_COMMIT> | |
git bisect start | |
git bisect bad | |
git bisect good <KNOWN_GOOD_COMMIT> | |
# cycle till done | |
git bisect log # to check what you've done so far | |
<test if good or bad> | |
git bisect bad|good |
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 OccuranceCount where | |
import Data.Foldable (foldl') | |
countWord :: String -> String -> Int | |
countWord needle = | |
foldl' (\acc word -> if word == needle then acc + 1 else acc) 0 . words | |
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 Highlight exposing (highlight, interweave) | |
type Html msg | |
= Mark (List (Html msg)) | |
| Text String | |
mark _ children = | |
Mark children |
NewerOlder