Skip to content

Instantly share code, notes, and snippets.

View habibiefaried's full-sized avatar
🏃‍♂️
Working non-stop

Habibie Faried habibiefaried

🏃‍♂️
Working non-stop
View GitHub Profile
@habibiefaried
habibiefaried / client.go
Created September 23, 2024 07:58
golang vpn tcp server
package main
import (
"io"
"log"
"net"
"github.com/songgao/water"
"github.com/vishvananda/netlink"
)
@habibiefaried
habibiefaried / basic-reverseproxy.go
Created June 16, 2024 09:26
Basic reverse proxy golang
package main
import (
"io"
"log"
"net/http"
)
func handleProxy(w http.ResponseWriter, r *http.Request) {
// Define the target server
@habibiefaried
habibiefaried / reverseproxy-v2.go
Last active June 16, 2024 09:23
Reverse proxy golang with oxy/forward package
package main
import (
"crypto/tls"
"github.com/vulcand/oxy/v2/forward"
"log"
"net/http"
"net/url"
)
@habibiefaried
habibiefaried / udp-agent-pushmon.go
Created June 15, 2024 13:52
UDP agent that is pushing to server
package main
import (
"fmt"
"net"
"sort"
"time"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"
@habibiefaried
habibiefaried / monitoring-pull-udpserver-infinite.go
Created June 15, 2024 11:53
using infinite loop for sending the stats, what could go wrong?
package main
import (
"fmt"
"net"
"sort"
"time"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"
@habibiefaried
habibiefaried / basic-mon.go
Last active June 15, 2024 11:15
basic monitoring golang
package main
import (
"fmt"
"sort"
"time"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/process"
@habibiefaried
habibiefaried / udpclient.go
Last active June 15, 2024 11:31
UDP server & client
package main
import (
"fmt"
"net"
)
func main() {
serverAddr := net.UDPAddr{
Port: 8080,
@habibiefaried
habibiefaried / tcp-client-to-http.go
Last active June 9, 2024 10:04
TCP Client to HTTP demo
package main
import (
"bufio"
"fmt"
"net"
"log"
"bytes"
)
Thread.getAllStackTraces().keySet().each() {
if (it.name.contains('Stress')) {
println "Stopping $it.name"
it.stop()
}
}
#!/usr/bin/python3
from hikerapi import Client
cl = Client(token="xxxx")
user_id = "xxx" # <your IG ID>
def get_followers(cl, user_id):
followers = {}
followers_len = -1