Skip to content

Instantly share code, notes, and snippets.

View josephgoksu's full-sized avatar
🏛️
crafting

Joseph Goksu josephgoksu

🏛️
crafting
View GitHub Profile
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯

First Weeks Priorities:

  1. Familiarize Yourself with the Team and Organization

    • Attend the "Welcome on board" meeting and introduce yourself to your new colleagues.
    • Schedule one-on-one meetings with team members to get to know them and their roles.
  2. Understand Your Role and Responsibilities

    • Have a meeting with your manager or team lead to clarify your role, goals, and expectations.
  3. Learn the Systems and Tools

{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{

Terraform Cheats

@josephgoksu
josephgoksu / minimum-aws-iam-permissions-creating-using-terraform.md
Created July 6, 2022 15:16
it easier to implement least privilege permissions by generating IAM policies based on access activity

iamlive: Generate an IAM policy from AWS calls using client-side monitoring (CSM) or embedded proxy

Installation

Homebrew

You may also install this application using a Homebrew tap with the following command:

brew install iann0036/iamlive/iamlive

@josephgoksu
josephgoksu / remove-node_modules-recursively.md
Last active July 6, 2022 15:29
Delete node_modules folder recursively from a specified path using command line

Delete node_modules folder recursively from a specified path using command line

Print out a list of directories to be deleted:

$ find . -name 'node_modules' -type d -prune

Delete directories from the current working directory:

$ find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +

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