Skip to content

Instantly share code, notes, and snippets.

View swghosh's full-sized avatar

Swarup Ghosh swghosh

View GitHub Profile
@swghosh
swghosh / create-hotspot.md
Created August 22, 2024 19:00 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@swghosh
swghosh / 00-kube-up.sh
Last active March 27, 2024 12:57
Launch kubeadm bootstrapped single node k8s cluster in a Fedora linux VM. (optionally, create an AWS Fedora VM and add k8s etcd encryption through AWS KMS plugin)
#!/bin/bash
sudo dnf group install -y "Container Management"
sudo dnf install -y golang
go version
sudo yum install -y \
containers-common \
device-mapper-devel \
@swghosh
swghosh / README.md
Last active May 23, 2023 18:26
Manifests for ambient credentials of cert-manager with OpenShift Cert Manager Operator
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@swghosh
swghosh / 00-letsencrypt-prod-certs.yaml
Last active December 1, 2022 11:43
Issuing LetsEncrypt Certificates using (OpenShift) Cert Manager Operator
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: "swghosh@redhat.com"
privateKeySecretRef:
name: letsencrypt
@swghosh
swghosh / resize_disk_image.md
Created November 18, 2022 20:51 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@swghosh
swghosh / crio_build_and_ignite_k8s_node_e2e.sh
Last active September 3, 2022 08:31
Script to generate a custom ignition config for running k8s-node-e2e test on Fedora CoreOS VM. It builds CRI-O locally in a container, prepares a bundle and uploads it to a GCP bucket for it to be used with the ignition config.
#!/usr/bin/env bash
set -eou pipefail
# Set these variables
# cri-o repo dir- path to cri-o source
CRIO_DIR=~/repositories/cri-o
# ignition dir- output directory for generated ignition config
IGNITION_OUT_DIR=~/Desktop
# evented pleg- use 0/1 as it's value depending upon whether crio binary should be started with --evented_pleg flag or not
@swghosh
swghosh / .colored_bash_prompt.bashrc
Created March 1, 2022 07:40
Slightly colored terminal prompt with vcs information.
#!/usr/bin/env bash
export COLOR_NC='\e[0m' # No Color
export COLOR_BLACK='\e[0;30m'
export COLOR_GRAY='\e[1;30m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_BROWN='\e[0;33m'
@swghosh
swghosh / xrdp_fedora29.md
Created December 10, 2021 07:08 — forked from jpwhite3/xrdp_fedora29.md
How to configure XRDP on Fedora 29
@swghosh
swghosh / # python@3.8 - 2020-12-03_20-04-11.txt
Created December 3, 2020 14:39
python@3.8 on macOS 11.0.1 - Homebrew build logs
Homebrew build logs for python@3.8 on macOS 11.0.1
Build date: 2020-12-03 20:04:11