Skip to content

Instantly share code, notes, and snippets.

View osmanmakal's full-sized avatar
🎯
Focusing

Osman Makal osmanmakal

🎯
Focusing
View GitHub Profile
@c1982
c1982 / player_test.go
Created December 29, 2021 13:35
DoD vs Std Struct
package main
import (
"math/rand"
"testing"
)
type Player struct {
ID int
health int
@deftonesclimb
deftonesclimb / checkip.sh
Created April 8, 2021 12:51
ips.txt dosyasına tek satır halinde yazılmış ipleri whois çeker
#!/bin/bash
file="ips.txt"
if [ ! -f "$file" ]; then
echo "$file .txt dosyasi bulunamadi!."
exit
fi
lines=`cat $file`
echo "# Query,Subnet,Registrant,AS Number,Country,Issuer"
for IP in $lines; do
@c1982
c1982 / inline_struct.go
Last active December 27, 2020 14:53
Benchmarks for inline, outline, anonymous struct
package main
import (
"encoding/json"
"testing"
)
type PD2 struct {
Property1 int `json:"property1"`
Property2 int `json:"property2"`
@montanaflynn
montanaflynn / pget.go
Last active January 17, 2025 17:07
Bounded Parallel Get Requests in Golang
package main
import (
"fmt"
"net/http"
"sort"
"time"
)
// a struct to hold the result from each request including an index