Skip to content

Instantly share code, notes, and snippets.

View SergeiMeza's full-sized avatar

Sergei Meza SergeiMeza

View GitHub Profile

Videos

@SergeiMeza
SergeiMeza / Firecloud Nearby GeoQuery
Created September 20, 2018 12:15 — forked from zirinisp/Firecloud Nearby GeoQuery
Firecloud Nearby GeoQuery
import CoreLocation
extension CLLocationCoordinate2D {
func boundingBox(radius: CLLocationDistance) -> (max: CLLocationCoordinate2D, min: CLLocationCoordinate2D) {
// 0.0000089982311916 ~= 1m
let offset = 0.0000089982311916 * radius
let latMax = self.latitude + offset
let latMin = self.latitude - offset
// 1 degree of longitude = 111km only at equator
@SergeiMeza
SergeiMeza / country_codes.json
Created September 11, 2018 19:56 — forked from orenitamar/country_codes.json
Two letter country code mapping, grouped by continent/region
{
"europe": {
"va": "vatican city",
"ch": "switzerland",
"ad": "andorra",
"ee": "estonia",
"is": "iceland",
"am": "armenia",
"al": "albania",
"cz": "czech republic",