Skip to content

Instantly share code, notes, and snippets.

View gabrielbussolo's full-sized avatar

Gabriel Bussolo gabrielbussolo

View GitHub Profile
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14), macOS Sequoia (15) and macOS Tahoe (26)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot. From Terminal : sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@gabrielbussolo
gabrielbussolo / bfs.go
Created September 14, 2023 10:56
Interactive and Recursive approach in golang
package main
import (
"container/list"
"fmt"
)
type Node struct {
Key int
Left *Node
@gabrielbussolo
gabrielbussolo / fibonacci.go
Created September 12, 2023 16:24
Fibonacci implementation interactive and recursive
package main
import "fmt"
func fibonacci(num int) int {
if num == 0 {
return 0
}
if num == 1 {
return 1
@gabrielbussolo
gabrielbussolo / graph.go
Created September 12, 2023 08:38
Simple graph implementation
package main
import "fmt"
type Graph struct {
vertices map[int][]int
}
func (g *Graph) AddVertice(vert int) {
if g.vertices == nil {
@gabrielbussolo
gabrielbussolo / queue.go
Created September 10, 2023 12:07
Simple queue implementation in golang
package main
import "fmt"
type Queue struct {
Head *Node
Tail *Node
}
type Node struct {
@gabrielbussolo
gabrielbussolo / stack_array.go
Created September 10, 2023 11:39
Stack implementation using array
package main
import "fmt"
type Stack struct {
data []int
}
func (s *Stack) Push(element int) {
s.data = append(s.data, element)
@gabrielbussolo
gabrielbussolo / stack.go
Created September 9, 2023 15:31
Stack implementation using linked list in golang
package main
import (
"fmt"
)
type Node struct {
Data int
Next *Node
}
@gabrielbussolo
gabrielbussolo / singlylinkedlist.go
Last active September 8, 2023 13:22
Singly linked list implementation in golang
package main
import (
"fmt"
)
func main() {
linkedList := NewLinkedList(10)
linkedList.Append(11)
linkedList.Append(112)