Skip to content

Instantly share code, notes, and snippets.

View 1ec5's full-sized avatar
🙈
Not actively reading bugmail

Minh Nguyễn 1ec5

🙈
Not actively reading bugmail
View GitHub Profile
@1ec5
1ec5 / detroit.geojson
Created October 1, 2018 18:38
Detroit metropolitan area
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@1ec5
1ec5 / coord_order.md
Last active November 10, 2021 22:24
Order in the coord

Coordinate order in various Mapbox libraries

Legend:

  • ✅ Behaves correctly at runtime
  • ❌ Compile-time or runtime error or otherwise impossible to write
  • 🙀 Behaves incorrectly at runtime
Mapbox-related library Latitude, longitude Longitude, latitude Order-independent
@1ec5
1ec5 / naics2012.tsv
Last active February 4, 2022 03:03
NAICS to OSM
Seq. No. 2012 NAICS US Code 2012 NAICS US Title OSM tags
1 11 Agriculture, Forestry, Fishing and Hunting
2 111 Crop Production landuse=farm OR landuse=farmland
3 1111 Oilseed and Grain Farming
4 11111 Soybean Farming crop=soy
5 111110 Soybean Farming
6 11112 Oilseed (except Soybean) Farming
7 111120 Oilseed (except Soybean) Farming
8 11113 Dry Pea and Bean Farming
9 111130 Dry Pea and Bean Farming
@1ec5
1ec5 / cincinnati.geojson
Last active January 21, 2022 08:14
Cincinnati metropolitan area
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//
// main.m
// HighRowGlyph
//
// Created by Minh Nguyen on 2018-02-01.
// Copyright © 2018 Mapbox. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
@1ec5
1ec5 / expression.m
Last active January 4, 2018 01:33
Freedom of NSExpression
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
/**
Joins the given components into a single string by concatenating each component
in order.
*/
NSString *MGLJoinComponents(Class self, SEL _cmd, NSArray<NSString *> *components) {
return [components componentsJoinedByString:@""];
}
@1ec5
1ec5 / .block
Last active November 1, 2018 19:01
Mapbox Streets & Buildings
license: cc-by-4.0
@1ec5
1ec5 / 408.geojson
Created August 20, 2017 23:53
408 area code
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import UIKit
// With help from http://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations#English
let Abbreviations = [
"apartments": "Apts",
"center": "Ctr",
"centre": "Ctr",
"county": "Co",
"creek": "Crk",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.