Skip to content

Instantly share code, notes, and snippets.

defer/ mañana

gocs gocs

defer/ mañana
View GitHub Profile
gocs / .md
Last active Nov 1, 2022
dayz deer isle alcatraz trap
View .md
gocs /
Last active Oct 28, 2022
Linux setups after initial os boot

update os (DO THIS FIRST)

sudo apt update
sudo apt upgrade -y

enable password authentication for ssh

gocs /
Created Jul 29, 2022
print for available tlds
#!/usr/bin/env bash
curl -SsfL | sed '/^#/d' - | awk '{print tolower($0)}'
gocs / .md
Created Jul 19, 2022
golang time.Time zero value
View .md

What should be the time.Time's zero value?

It should be time.Now()

gocs / baud.go
Last active Jul 19, 2022
why does usb serial prints unreadable �? identify your usb's BAUD `stty -F /dev/ttyUSB0`
View baud.go
package main
import (
func main() {
gocs /
Last active Jul 17, 2022
signal cancel and timeout on an infinite loop go golang

golang program to gracefully terminate on SIGTERM signal or timeout in a loop

ctrl + c gracefully terminates the app using the current terminal

terminate app from different terminal

the program output its pid

gocs /
Created Jun 27, 2022
enable UTF-8 support in the Linux console?
# send character-string to enable UTF-8 mode
if test ".$1" = ".off" ; then
printf '\033%%@'
printf '\033%%G'
gocs / golang
Created Jun 27, 2022
golang for raspi 4 model b
View golang


what release should I use for my raspberry pi 4 model b?

$ uname -m


gocs / support for password authentication was
Last active Jul 2, 2022
remote: Support for password authentication was removed
View support for password authentication was

got this error when using gh?

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see for more information.
fatal: Authentication failed for '<user>/<repo>/'

my approach is to re-authenticate gh