Skip to content

Instantly share code, notes, and snippets.

View josephgoksu's full-sized avatar
🏛️
crafting

Joseph Goksu josephgoksu

🏛️
crafting
View GitHub Profile

For 10.0.0.0/16, we can create subnets between 10.0.0.0/24 to 10.0.255.0/24, e.g. 10.0.8.0/24 would work.

Let's say we've got CIDR address 10.20.30.40 - that can fall for example into these subnets:

10.0.0.0/8 - /8 means only the first byte (10.) in the address is the network address.
10.20.0.0/16 - /16 means the first two bytes (10.20.) are network.
10.20.30.0/24 - /24 means the first three bytes (10.20.30.) are network.
10.20.30.40/32 - /32 covers the whole address (10.20.30.40) and sometimes this notation is used to explicitly say it's a host address. AWS uses that a lot.

RSA 2048 Key-Pair Generation

Generate Private Key

openssl genrsa -out mykey.pem 2048

Generate Public key using Private Key

openssl rsa -in mykey.pem -pubout > mykey.pub


@josephgoksu
josephgoksu / aws-ec2-install-docker.md
Created April 27, 2022 08:04
Install docker and docker-compose to AWS EC2 instance

UPDATE (27 April 2022)

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
@josephgoksu
josephgoksu / docker-cheats.md
Last active July 18, 2022 12:06
Cheatsheet for docker

Configure Docker to start on boot

Most current Linux distributions (RHEL, CentOS, Fedora, Debian, Ubuntu 16.04 and higher) use systemd to manage which services start when the system boots. On Debian and Ubuntu, the Docker service is configured to start on boot by default. To automatically start Docker and Containerd on boot for other distros, use the commands below:

 sudo systemctl enable docker.service

 sudo systemctl enable containerd.service
@josephgoksu
josephgoksu / calculateAverageRank.js
Created August 16, 2020 20:20
Billion Dollar Company First Code
const input = {
id: "286ba27a-dffb-11ea-87d0-0242ac130003",
rank: 4.75,
date: 120,
};
const input2 = {
id: "286ba27a-dffb-11ea-87d0-0242ac130003",
rank: 2.5,
date: 121,
@josephgoksu
josephgoksu / retrain-mobilenet-for-the-web.md
Created December 15, 2019 18:38 — forked from woudsma/retrain-mobilenet-for-the-web.md
Retrain a MobileNet model for the web with TensorFlow for Poets and TensorFlow.js

Retrain a MobileNet model and use it in the browser with TensorFlow.js

DRAFT

Combining TensorFlow for Poets and TensorFlow.js.
Retrain a MobileNet V1 or V2 model on your own dataset using the CPU only.
I'm using a MacBook Pro without Nvidia GPU.

MobileNets can be used for image classification. This guide shows the steps I took to retrain a MobileNet on a custom dataset, and how to convert and use the retrained model in the browser using TensorFlow.js. The total time to set up, retrain the model and use it in the browser can take less than 30 minutes (depending on the size of your dataset).

Example app - HTML/JS and a retrained MobileNet V1/V2 model.

@josephgoksu
josephgoksu / countries.js
Created December 13, 2019 23:16
All Countries (code, name, region, LocaleKey, ISO3A)
const countries = [
{
code: 'FI',
name: 'Finland',
region: 'Europe',
regionLocaleKey: 'ITC.region.EUR',
currencyCodeISO3A: 'EUR',
},
{
code: 'MR',

Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feature - New feature.
@josephgoksu
josephgoksu / extensions.sh
Last active January 26, 2019 20:40
VSCode Configurations
code --install-extension \
aaron-bond.better-comments \
christian-kohler.npm-intellisense \
christian-kohler.path-intellisense \
codezombiech.gitignore \
CoenraadS.bracket-pair-colorizer \
cssho.vscode-svgviewer \
dbaeumer.vscode-eslint \
donjayamanne.githistory \
dsznajder.es7-react-js-snippets \
@josephgoksu
josephgoksu / git_branch_naming.md
Last active December 11, 2018 08:39
Awesome Git

Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feature - New feature.
relase - New Release.