Skip to content

Instantly share code, notes, and snippets.

View bjing's full-sized avatar

Brian Jing bjing

  • Australia
View GitHub Profile
@bjing
bjing / scala_base64_encode_decode.scala
Created August 21, 2023 23:48 — forked from frgomes/scala_base64_encode_decode.scala
Scala - Base64 encode/decode
// Base64 encode
val text = "This is plaintext."
val bytesEncoded = java.util.Base64.getEncoder.encode(text.getBytes())
// Base64 decode
val textDecoded = new String(java.util.Base64.getDecoder.decode(bytesEncoded))
println(textDecoded)
@bjing
bjing / delete_git_submodule.md
Created August 2, 2022 02:42 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@bjing
bjing / PAB_setup.md
Last active January 7, 2022 11:47 — forked from mikekeke/PAB_setup.md
PAB setup

Hosted PAB setup

This document describes how to prepare hosted PAB deployment from scratch that can operate on Alonzo purple testnet.

The following required to be run on host machine to use PAB with contracts in hosted scenario on testnet (for 2020-11-05 PAB Release):

  • Cardano node connected to Alonzo testnet
  • cardano wallet connected to node
  • chain-index connected to node
  • PAB executable connected to node, cardano-wallet and chain-index

Note: we are using somewhat more involved setup with a bit custom docker compose, and wallet and chain-index being built from sources, but there is ready to go node+wallet docker solution available