Skip to content

Instantly share code, notes, and snippets.

View jsteenb2's full-sized avatar

Johnny Steenbergen jsteenb2

  • CrowdStrike
  • Thousand Oaks, CA
View GitHub Profile
@jsteenb2
jsteenb2 / distance_away_report.rb
Created August 26, 2016 04:35 — forked from matthutchinson/distance_away_report.rb
Ruby script for the find distance between two points using haversine formula
MAX_DISTANCE_AWAY_IN_KM = 100.0
RAD_PER_DEG = 0.017453293
Rmiles = 3956 # radius of the great circle in miles
Rkm = 6371 # radius in kilometers, some algorithms use 6367
Rfeet = Rmiles * 5282 # radius in feet
Rmeters = Rkm * 1000 # radius in meters
def haversine_distance( lat1, lon1, lat2, lon2 )
dlon = lon2 - lon1
@jsteenb2
jsteenb2 / golang-tls.md
Created January 11, 2018 19:41 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
{ "date": "11-07-22", "rates": { "USD": "1.0163", "JPY": "138.05", "BGN": "1.9558", "CZK": "24.614", "DKK": "7.4424", "GBP": "0.84585", "HUF": "402.45", "PLN": "4.7630", "RON": "4.9431", "SEK": "10.6665", "CHF": "0.9913", "ISK": "139.50", "NOK": "10.2630", "HRK": "7.5190", "TRY": "17.6026", "AUD": "1.4871", "BRL": "5.4345", "CAD": "1.3201", "CNY": "6.8095", "HKD": "7.9769", "IDR": "15210.73", "ILS": "3.5325", "INR": "80.5280", "KRW": "1321.61", "MXN": "20.8477", "MYR": "4.4992", "NZD": "1.6464", "PHP": "56.882", "SGD": "1.4228", "THB": "36.602", "ZAR": "17.1922" }}