Skip to content

Instantly share code, notes, and snippets.

@tanyongzheng
tanyongzheng / countriesAddressPostal.js
Last active August 19, 2020 02:58 — forked from ShreyKumar/countriesAddressPostal.js
List of countries and their respective postal codes with ranges (July 2020)
// Country list source: https://www.dhl.com/en/country_profile.html#.XwODEJNKjOQ
// Country abbreviation source: https://planetarynames.wr.usgs.gov/Abbreviations
// Postal code: https://gist.githubusercontent.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b/raw/21662445653ac861f8ab81caa8cfaee3185aed15/postal-codes.json
// Postal code: https://en.wikipedia.org/wiki/List_of_postal_codes
// Country/territory items with no postal code regexes or ranges either do not require postal codes
// or there may not be enough information for that country/territory
export const COUNTRY_ADDRESS_POSTALS = [{
abbrev: 'AF',
@tanyongzheng
tanyongzheng / postal-codes.json
Created August 19, 2020 02:56 — forked from jamesbar2/postal-codes.json
Global postal codes regex formats
[{
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup",
"Country": "Afghanistan",
"ISO": "AF",
"Format": "NNNN",
"Regex": "^\\d{4}$"
}, {
"Note": "With Finland, first two numbers are 22.",
"Country": "Åland Islands",
"ISO": "AX",
@tanyongzheng
tanyongzheng / set fork project can get official commit
Last active January 8, 2020 09:07
fork项目同步官方的commit
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/you-user/you-fork-project.git
fetch = +refs/heads/*:refs/remotes/origin/*
@tanyongzheng
tanyongzheng / 同时提交到github和gitee
Last active November 16, 2019 12:57
同时提交到github和gitee
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://gitee.com/XXX/XXXX.git
fetch = +refs/heads/*:refs/remotes/origin/*