Skip to content

Instantly share code, notes, and snippets.

View fractalbach's full-sized avatar
💭
🎈

Chris Achenbach fractalbach

💭
🎈
View GitHub Profile
@fractalbach
fractalbach / heap_snippet.go
Created April 23, 2019 21:50
Example of using golang gods package for a heap
package main
import (
"fmt"
"github.com/emirpasic/gods/trees/binaryheap"
)
type item struct {
data interface{}
priority int
@fractalbach
fractalbach / URL2Number.py
Created April 25, 2019 06:44
Displays a URL as it's IP address in dot-decimal notation, binary, and decimal representations.
"""
URL to Binary to Decimal
How it Works
1. Does a DNS lookup on the URL given.
2. Converts the 255.255.255.255 into 4 binary numbers
3. Appends each of the binary numbers together
4. Converts the appended binary number into a decimal.