I hereby claim:
- I am danielreiser on github.
- I am danielreiser (https://keybase.io/danielreiser) on keybase.
- I have a public key ASDte3XvElURSZKlWfylMS6FDNz_hZZDfPio-8wdmXCeigo
To claim this, I am signing this object:
/** | |
* Regexes for VAT-ID format validation. | |
*/ | |
export const VAT_ID_REGEXES = { | |
AT: /^(AT)?U[0-9]{8}$/, | |
BE: /^(BE)?0[0-9]{9}$/, | |
BG: /^(BG)?[0-9]{9,10}$/, | |
CY: /^(CY)?[0-9]{8}L$/, | |
CZ: /^(CZ)?[0-9]{8,10}$/, | |
DE: /^(DE)?[0-9]{9}$/, |
I hereby claim:
To claim this, I am signing this object:
nmap -n -sP 172.16.57.0/24 | awk '{printf $5;printf " ";getline;getline;print $3;}' |
# Prerequisites ffmpeg (`brew install ffmpeg`) & gifsicle (`brew install gifsicle`) | |
# 1. Record screen with quicktime | |
# 2. Save as *.mov | |
# 3. Convert with ffmpeg & gifsicle :ok_hand: | |
ffmpeg -i input.mov -s 600x400 -pix_fmt rgb24 -r 30 -f gif - | gifsicle --optimize=3 --delay=3 > output.gif |
# Update all package lists and update ubuntu | |
sudo apt-get -y update | |
sudo apt-get -y dist-upgrade | |
# Add the docker repository to make it available via apt-get install and update the package lists again | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io |
# We need make in order for openmaptiles to work correctly | |
sudo apt-get install -y make | |
# get the openmaptiles tooling | |
git clone https://github.com/openmaptiles/openmaptiles.git | |
cd ./openmaptiles | |
# We've decided to only get the mapdata until zoom level 12. It's a good idea to check first which zoom levels you'll need. Eveything higher then 12 take a lot of time and space | |
sed -i "/MAX_ZOOM=/c\MAX_ZOOM=12" .env | |
# Prep openmaptiles and download the raw OSM data for europe |
cd data/ | |
sudo apt-get install -y python | |
git clone https://github.com/mapbox/mbutil.git | |
./mbutil/mb-util --image_format=pbf tiles.mbtiles tiles | |
cd ../tiles/ |
# Un-gzip them | |
gzip -d -r -S .pbf * | |
# Rename them (this also renames all non-pbf files) | |
find . -type f -exec mv '{}' '{}'.pbf \; | |
# As i said, it renames all files so we have to remove the suffix once more | |
mv metadata.json{.pbf,} |
const { closest, distance } = require('fastest-levenshtein') | |
// Approach A - Using closest | |
const routes = { | |
paymentMethods: 'paymentmethods', | |
accountData: 'account-data', | |
privacy: 'privacy', | |
privacySettings: 'privacy-settings', | |
} |
const { distance } = require('fastest-levenshtein') | |
// Approach B - Using distance which gives us more control in conjunction with a MAX_DISTANCE value | |
const routes = { | |
paymentMethods: 'paymentmethods', | |
accountData: 'account-data', | |
profile: 'profile', | |
privacySettings: 'privacy-settings', | |
} |