Skip to content

Instantly share code, notes, and snippets.

👾
Wondering

udhos

Block or report user

Report or block udhos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@udhos
udhos / golang_empty_struct
Created Apr 29, 2019
golang_empty_struct
View golang_empty_struct
// the empty struct consumes zero bytes
// see: https://dave.cheney.net/2014/03/25/the-empty-struct
// see: https://github.com/bradfitz/iter
package main
import (
"fmt"
"strconv"
"unsafe"
@udhos
udhos / learning_kubernetes_basics
Last active Apr 18, 2019
learning_kubernetes_basics
View learning_kubernetes_basics
+ 01 Bootcamp: https://kubernetesbootcamp.github.io/kubernetes-bootcamp/
+ 02 Services: https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
+ 03 Best Practices: https://www.weave.works/blog/kubernetes-best-practices
https://www.youtube.com/watch?v=BznjDNxp4Hs
/ 04 Concepts: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
@udhos
udhos / golang_containers
Last active Apr 1, 2019
golang_containers
View golang_containers
https://github.com/google/go-containerregistry - Go library and CLIs for working with container registries
https://github.com/google/crfs - CRFS: Container Registry Filesystem
https://github.com/knative/serving - Kubernetes-based serverless
https://github.com/apex/up - Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS
https://github.com/meteatamel/knative-tutorial - Knative Tutorial
https://medium.com/google-cloud/hands-on-knative-part-1-f2d5ce89944e - Knative Tutorial
@udhos
udhos / golang_list_available_module_versions
Created Mar 20, 2019
golang_list_available_module_versions
View golang_list_available_module_versions
$ go list -m -versions rsc.io/sampler
rsc.io/sampler v1.0.0 v1.2.0 v1.2.1 v1.3.0 v1.3.1 v1.99.99
$
https://blog.golang.org/using-go-modules
@udhos
udhos / bool2int.go
Created Mar 7, 2019
bool2int golang unsafe trick
View bool2int.go
// https://stackoverflow.com/a/51097467/1011695
package main
import (
"fmt"
"unsafe"
)
func main() {
@udhos
udhos / golang anonymous struct
Created Mar 1, 2019
golang anonymous struct
View golang anonymous struct
// https://play.golang.org/p/mJYbMCxYbbK
package main
import (
"fmt"
)
func main() {
View git config
git config --global user.name udhos
git config --global user.email udhos
git config --global credential.helper 'cache --timeout=3600'
@udhos
udhos / ec2 userdata cloud-boothook
Last active Feb 20, 2019
ec2_userdata_cloud-boothook
View ec2 userdata cloud-boothook
https://docs.aws.amazon.com/pt_br/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html
Script de dados do usuário: Começa com #! ou Content-Type: text/x-shellscript.
Ou seja, basta:
#!/bin/bash
systemctl stop spotbq
systemctl disable spotbq
@udhos
udhos / gowebhello_cloudinit
Last active Feb 12, 2019
gowebhello_cloudinit
View gowebhello_cloudinit
#!/bin/bash
yum -y update
yum install -y git
cd /tmp
rm -rf update-golang
git clone https://github.com/udhos/update-golang
cd update-golang
./update-golang.sh
@udhos
udhos / BOOGERS.BAS
Created Jan 20, 2019 — forked from andy5995/BOOGERS.BAS
source code for BOOGERS by Mitch Teich 1982
View BOOGERS.BAS
1 REM NOTHING
2 REM
3 REM
5 REM DATNOIDS Copyright (c) 1982 By Casey Roche
8 REM
9 SCREEN 0,0,0
10 KEY OFF:WIDTH 80:COLOR 0,1,0:CLS:PLAY"mb":COLOR 4,0:LOCATE 24,1:PRINT" "+STRING$(78,219):SOUND 1000,1:PRINT" 000000 0000 00000000 00 00 000000 00000000 000000 00000":SOUND 2000,1
80 PRINT" 0222220 022220 02222220 02 20 02222220 02222220 0222220 0222220":SOUND 1000,1:PRINT" 02 20 02 20 22 020 20 02 20 22 02 20 0220 ":SOUND 2000,1
120 PRINT" 02 20 02 20 22 0220 20 02 20 22 02 20 0220 ":SOUND 1000,1:PRINT" 02 20 02222220 22 0202020 02 20 22 02 20 0220 ":SOUND 2000,1
160 PRINT" 02 20 02 20 22 02 0220 02 20 22 02 20 0220":SOUND 1000,1:PRINT" 02 20 02 20 22 02 020 02 20 22 02 20 0220":SOUND 2000,1
You can’t perform that action at this time.