Skip to content

Instantly share code, notes, and snippets.

View xieyuschen's full-sized avatar
☺️
Keep Loving, Keep Learning :)

Griffin xieyuschen

☺️
Keep Loving, Keep Learning :)
View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 1, 2024 03:14
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@miguelmota
miguelmota / rsa_util.go
Last active July 24, 2024 08:34
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@c-bata
c-bata / libffm.go
Last active February 19, 2021 18:49
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
@peterbartha
peterbartha / README.md
Last active July 11, 2024 08:21
Convert Rust books to EPUB (incl. The Rust Programming Language)

Convert Rust books to EPUB (incl. The Rust Programming Language)

The following steps work for all the HTML learning materials on the Learn Rust page:

  1. Click on the "Print this book" icon in the top right corner.
  2. "Cancel" print popup.
  3. Press F12.
  4. Copy, paste, and run the contents of ebookFormatPreparation.js into your browser's console.
  5. Save the modified HTML file.
@xieyuschen
xieyuschen / why_monad_transformer.md
Created June 6, 2023 10:53
Haskell: why we need a monad transoformer?

Haskell: why we need a monad transoformer?

When learning the haskell monad transformer(would call it monadt in the left content), a problem in my mind is why monadT? Because from a simple example view, we could make a pale of monad together to do what we want we want to do.

Technially, it's correct, the monadT is just a wrapper. For example, those two cases are equal.

ioOp :: IO String
ioOp = getLine

maybeOp :: Maybe String -&gt; Maybe String