Private address classes
| class | from | to | CIDR notation | subnet mask |
|---|---|---|---|---|
| A | 10.0.0.0 | 10.255.255.255 | /8 | 255.0.0.0 |
| B | 172.16.0.0 | 172.31.255.255 | /12 | 255.240.0.0 |
| C | 192.168.0.0 | 192.168.255.255 | /16 | 255.250.0.0 |
| APIPA | 169.254.0.0 | 169.254.255.255 | /16 | 255.250.0.0 |
| #cat example.json | |
| #{ | |
| # "myKey": "myValue", | |
| # "myArray": [ | |
| # "hello", | |
| # "world" | |
| # ] | |
| #} | |
| cat example.json | jq -c | jq -R |
| https://getavataaars.com | |
| https://myoctocat.com | |
| https://gopherize.me | |
| https://avatarmaker.com | |
| https://charactercreator.org | |
| https://personas.draftbit.com | |
| https://www.tinygraphs.com | |
| https://eu.ui-avatars.com | |
| http://timpietrusky.github.io/alien-avatar-generator | |
| https://avatar.oxro.io |
| #!/bin/bash | |
| PREFIX="argo-cd-" | |
| INSTALL_FILE="install.yaml" | |
| TEMPLATES_PATH="templates/" | |
| # reset templates | |
| rm -fr ${TEMPLATES_PATH} | |
| mkdir -p ${TEMPLATES_PATH} | |
| cd ${TEMPLATES_PATH} |
| #!/bin/bash | |
| # unofficial bash strict mode | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # run from any directory (no symlink allowed) | |
| CURRENT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd -P) | |
| cd ${CURRENT_PATH} |
Private address classes
| class | from | to | CIDR notation | subnet mask |
|---|---|---|---|---|
| A | 10.0.0.0 | 10.255.255.255 | /8 | 255.0.0.0 |
| B | 172.16.0.0 | 172.31.255.255 | /12 | 255.240.0.0 |
| C | 192.168.0.0 | 192.168.255.255 | /16 | 255.250.0.0 |
| APIPA | 169.254.0.0 | 169.254.255.255 | /16 | 255.250.0.0 |
| #!/bin/bash | |
| #brew install qpdf | |
| PADDING_SIZE=6 | |
| for i in {0..999999} | |
| do | |
| PWD_TMP=$(printf "%0*d\n" $PADDING_SIZE $i) | |
| #echo $PWD_TMP |
Install Play
wget https://downloads.typesafe.com/typesafe-activator/1.3.12/typesafe-activator-1.3.12-minimal.zip -P Downloads/
unzip Downloads/typesafe-activator-1.3.12-minimal.zip -d ~/opt/typesafe
# add to PATH
vim .bashrc
export ACTIVATOR='~/opt/typesafe/activator-1.3.12-minimal/'
export PATH=$PATH:$ACTIVATOR/bin
source .bashrc
| // https://projecteuler.net/problem=8 | |
| // ---------- LargestProduct.scala ---------- | |
| import scala.annotation.tailrec | |
| object LargestProduct { | |
| def solution(s: String, magnitude: Int): Long = { | |
| def charToLong(c: Char): Long = c.toLong - 48L |
| #!/bin/bash | |
| for i in $(git branch -r | grep -vE "HEAD|master"); do | |
| git branch --track ${i#*/} $i; done |
| #!/bin/bash | |
| sudo apt-get install pdftk | |
| sudo snap install pdftk | |
| pdftk ebook_original.pdf output ebook_uncompress.pdf uncompress | |
| sed -e "s/Licensed to XXX <[email protected]>/ /" ebook_uncompress.pdf > ebook_uncompress_modify.pdf | |
| pdftk ebook_uncompress_modify.pdf output ebook_modify.pdf compress |