Skip to content

Instantly share code, notes, and snippets.

View dsdenes's full-sized avatar

Denes Pal dsdenes

View GitHub Profile
@kkroesch
kkroesch / rdap.curl
Last active June 19, 2024 02:52
Get RDAP information about IP address.
curl -sL https://rdap.db.ripe.net/ip/85.0.0.116 | jq ". | .handle, .name, .country" | tr -d '"'
@kendellfab
kendellfab / read_line.go
Created November 11, 2013 17:41
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}