Skip to content

Instantly share code, notes, and snippets.

View josephgoksu's full-sized avatar
🏛️
crafting

Joseph Goksu josephgoksu

🏛️
crafting
View GitHub Profile
#!/bin/bash
set -e
set -x
# Set the GitHub repository name
repo="username/reponame"
# Function to delete a single run
delete_run() {
@josephgoksu
josephgoksu / switch_to_vscodium.sh
Last active July 5, 2024 11:34
This bash script automates the process of switching from Visual Studio Code (VSCode) or VSCode Insiders to VSCodium on macOS
#!/bin/bash
# Check if running on macOS
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "This script is designed to run on macOS."
exit 1
fi
# Function to check if a cask is installed
is_cask_installed() {
// 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