Skip to content

Instantly share code, notes, and snippets.

@bgbaroo
bgbaroo / js-functions-test.md
Last active May 31, 2023 13:49
Cleverse Academy tech test #1: Foundation JavaScript - Functions

Cleverse Academy Tech Test #1: Foundation JavaScript

Functions

  1. Parameters and return values

    1.1 Basic parameters and return values

    Given this function:

@bgbaroo
bgbaroo / tower_of_hanoi.go
Created December 3, 2022 19:01
Tower of Hanoi
package main
import "fmt"
const (
// Rods are 1, 2, and 3
// Given src and dst, the other buffer rod is (1+2+3) - (src + dst) = 6 - (src + dst)
rod1 = iota + 1
rod2
rod3
@bgbaroo
bgbaroo / mapstruct.go
Last active October 17, 2021 13:34
mapstructure package example with nested struct and tags
package main
import (
"encoding/json"
"fmt"
"github.com/mitchellh/mapstructure"
)
const (
@bgbaroo
bgbaroo / log.go
Created October 12, 2021 18:02
Basic logging in Go
package main
import (
"log"
"os"
)
var (
InfoLogger *log.Logger
WarningLogger *log.Logger