Skip to content

Instantly share code, notes, and snippets.

View danielreiser's full-sized avatar

Daniel Reiser danielreiser

View GitHub Profile
@danielreiser
danielreiser / step1_osm-vector-tiles.sh
Last active July 27, 2021 10:01
Install docker and docker-compose on an ubuntu based EC2 instance in AWS
# 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
@danielreiser
danielreiser / mov2gif
Last active September 12, 2018 15:30
Convert mov to gif (slow down to 30 fps)
# 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
@danielreiser
danielreiser / ipmacscan.sh
Created August 7, 2018 11:32
Scan subnet for connected client, output IP & MAC-Address
nmap -n -sP 172.16.57.0/24 | awk '{printf $5;printf " ";getline;getline;print $3;}'

Keybase proof

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:

@danielreiser
danielreiser / vat-id-validation.constants.js
Created October 12, 2017 07:27
Regexes for validating european VAT-IDs.
/**
* 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}$/,