Skip to content

Instantly share code, notes, and snippets.

@knaveightt
knaveightt / maps_structs.go
Created February 23, 2023 17:40
Learn Go - Maps and Structs examples
// Map examples, Struct examples
package main
import (
"fmt"
"reflect"
)
// used for checking tags
@knaveightt
knaveightt / arrays-slices.go
Created February 17, 2023 22:04
Learn Go - Arrays and Slices Summary
// Arrays and Slices
package main
import (
"fmt"
)
func main() {
// basic syntax and initialization
grades := [3]int{97, 85, 93}
@knaveightt
knaveightt / constants.go
Created February 17, 2023 21:07
Learn Go - Constants Summary
// Constants Examples
package main
import "fmt"
// enumerated constants
const (
e1 = iota
e2 // it is inferring iota
e3 // it is inferring iota
@knaveightt
knaveightt / primitives.go
Last active February 17, 2023 19:49
Learn Go - Primitives Summary
// Primitives Examples
package main
import "fmt"
func main() {
var n bool = true
var m bool // zero value is false
fmt.Printf("%v, %T\n", n, n)
fmt.Printf("%v, %T\n", m, m)
@knaveightt
knaveightt / variables.go
Created February 17, 2023 17:20
Learn Go - Variables Summary
// Variables Examples
package main
import (
"fmt"
"strconv"
)
// package level var that is publically visible (uppercase)
var (
@knaveightt
knaveightt / Colorscheme-DustyHybrid.txt
Created January 25, 2023 15:04
An XResources Colorscheme
! Exported from Terminal.Sexy
! Modified from collection/hybrid by W0ng
! special
*.foreground: #cbc4ba
*.background: #211f1d
*.cursorColor: #cbc4ba
! black
*.color0: #282724
@knaveightt
knaveightt / bookmark-idea.txt
Last active February 28, 2023 22:17
Quick Specification for a Python/Bash based Bookmark Management System
// Quick and dirty specification for my bookmarks system using python/bash scripts to manage bookmarks of differnet types
// scripts/files to be used
// $HOME/.config/kcbookmarks/kcbookmarkrc
// $HOME/.local/share/kcbookmarks/bookmarks.yaml
// $HOME/.local/share/kcbookmarks/kcbookmarks.py
// $HOME/.local/bin/kc-bookmark-get-quick
// $HOME/.local/bin/kc-bookmark-get-menu
// $HOME/.local/bin/kc-bookmark-add-menu
[alias]
gl = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
gl2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
@knaveightt
knaveightt / colorscheme.txt
Last active May 27, 2021 05:49
"Chevronic" colorscheme
! "Chevronic" colorscheme, by knaveightt
! Provided in .Xresources format (you can import this into terminal.sexy and play around)
! special
*.foreground: #bdbdbd
*.background: #0d0d0d
*.cursorColor: #bdbdbd
! black
*.color0: #555555