Skip to content

Instantly share code, notes, and snippets.

alias pm='git fetch origin master:master'

@spff
spff / Install colima, docker compose, buildx on MacOS.txt
Created December 21, 2023 06:11
Install colima, docker compose, buildx on MacOS
https://aosolorzano.medium.com/installing-colima-as-a-docker-engine-provider-with-buildx-and-compose-plugins-installed-1ce8b3bae158
paths=(
"~/Library/Cookies/com.docker.docker.binarycookies"
"~/Library/Logs/Docker Desktop"
"~/Library/Application Support/Docker Desktop"
"~/Library/Caches/com.docker.docker"
"~/Library/Group Containers/group.com.docker"
"~/Library/Saved Application State/com.electron.docker-frontend.savedState"
"/Library/PrivilegedHelperTools/com.docker.vmnetd"
apt update
apt install -y git nodejs tmux vim nginx
# install docker https://docs.docker.com/engine/install/debian/
# install mstream https://github.com/IrosTheBeggar/mStream/#quick-install-from-cli
mkdir -p /mnt/nas
vim /home/spff/.smbcred
username=spff
- [Developing
Time-Oriented
Database Applications
in SQL](https://www2.cs.arizona.edu/~rts/tdbbook.pdf)
- Designing Data-Intensive Application
-
@spff
spff / monad.md
Last active August 15, 2022 02:55

Haskell

{-# OPTIONS -W #-}
{-# LANGUAGE TemplateHaskell #-}
import Test.QuickCheck (quickCheckAll)
import Control.Monad.Trans.State

traverse :: (Monad m) -> (a -> m b) -> [a] -> m [b] -- aka mapM
-- This exercise covers the first 6 and the 8th chapters of "Learn You a Haskell for Great Good!"
-- Chapter 1 - http://learnyouahaskell.com/introduction
-- Chapter 2 - http://learnyouahaskell.com/starting-out
-- Chapter 3 - http://learnyouahaskell.com/types-and-typeclasses
-- Chapter 4 - http://learnyouahaskell.com/syntax-in-functions
-- Chapter 5 - http://learnyouahaskell.com/recursion
-- Chapter 6 - http://learnyouahaskell.com/higher-order-functions
-- Chapter 8 - http://learnyouahaskell.com/making-our-own-types-and-typeclasses

Pattern vs Guard

Whereas patterns are a way of making sure a value conforms to some form and deconstructing it, guards are a way of testing whether some property of a value (or several of them) are true or false.

Higher order functions

A function that does either of those is called a higher order function.

Curried functions and Partial application

  • Functions are curried by default.
  • -> is right associative by default.
  1. flip

IAM 的三大基本功能

  • authentication

    • key pairs
    • TOTP
    • Hardware OTP (FIDO2/webauth)
  • authorization

  • access controll

    • rbac
  • acl

[
{
"title": "Ion Marin conducts Mussorgsky, Dvořák, Khachaturian, Strauss, Wagner... – With Renée Fleming",
"url_movie": "/concerts/ion-marin-renee-fleming-waldbuhne-2010"
},
{
"title": "Jonas Kaufmann: \"Dolce Vita,\" Italian songs and arias",
"url_movie": "/concerts/jonas-kaufmann-dolce-vita-live-waldbuhne-berlin"
},
{