Skip to content

Instantly share code, notes, and snippets.

View pedrobertao's full-sized avatar
🚀

Pedro Bertao pedrobertao

🚀
View GitHub Profile
@pedrobertao
pedrobertao / min-max.go
Last active August 27, 2023 12:16
Min/Max Golang 1.21
package main
import "fmt"
func main() {
minInt := min(3, 2, 1, 4)
minFloat := min(4.0, 2.0, 3.0, 1.0)
minString := min("ab", "a", "abcd", "abc")
@pedrobertao
pedrobertao / clear.go
Created August 26, 2023 10:39
Example of Clear in Go
package main
import "fmt"
func main() {
intSlice := []int{1, 2, 3}
floatSlice := []float64{1.0, 2.0, 3.0}
stringSlice := []string{"a", "b", "c"}
mapString := map[string]string{
"Name": "Pedro",
@pedrobertao
pedrobertao / standard-media-queries.css
Last active February 21, 2024 09:39
Standard media queries css tricks width height landscape portrait
/* Small screens, laptops (landscape) ----------- */
@media only screen
and (min-device-width : 769px)
and (max-device-width : 1024px) {
/* Styles */
}
/* Desktops & large screens (landscape) ----------- */
@media only screen
and (min-device-width : 1025px)
@pedrobertao
pedrobertao / fib.go
Last active September 22, 2024 14:05
Recursive and Iterative Fibonnaci Sequence
package main
import "fmt"
func fibRecursive(position uint) uint {
if position <= 2 {
return 1
}
return fibRecursive(position-1) + fibRecursive(position-2)
}