Skip to content

Instantly share code, notes, and snippets.


Swarup Ghosh swghosh

View GitHub Profile
swghosh / 00-letsencrypt-prod-certs.yaml
Last active December 1, 2022 11:43
Issuing LetsEncrypt Certificates using (OpenShift) Cert Manager Operator
View 00-letsencrypt-prod-certs.yaml
kind: Issuer
name: letsencrypt
email: ""
name: letsencrypt
swghosh /
Created November 18, 2022 20:51 — forked from joseluisq/
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 /
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
# ignition dir- output directory for generated ignition config
# evented pleg- use 0/1 as it's value depending upon whether crio binary should be started with --evented_pleg flag or not
swghosh / .colored_bash_prompt.bashrc
Created March 1, 2022 07:40
Slightly colored terminal prompt with vcs information.
View .colored_bash_prompt.bashrc
#!/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 /
Created December 10, 2021 07:08 — forked from jpwhite3/
How to configure XRDP on Fedora 29
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
View # python@3.8 - 2020-12-03_20-04-11.txt
Homebrew build logs for python@3.8 on macOS 11.0.1
Build date: 2020-12-03 20:04:11
swghosh / # python@3.9 - 2020-11-30_02-46-23.txt
Created December 3, 2020 13:47
python@3.9 on macOS 11.0.1 - Homebrew build logs
View # python@3.9 - 2020-11-30_02-46-23.txt
Homebrew build logs for python@3.9 on macOS 11.0.1
Build date: 2020-11-30 02:46:23
swghosh /
Last active June 8, 2021 00:48
TensorFlow keras implementation of GoogLeNet incarnation of the Inception network architecture. (Szegedy et. al "Going Deeper with Convolutions", CVPR 2015)
#!/usr/bin/env python3
Construct GoogLeNet incarnation of the Inception network using Keras.
from tensorflow.keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, GlobalAveragePooling2D
from tensorflow.keras.layers import Input, Dense, Dropout, Concatenate, Flatten
from tensorflow.nn import local_response_normalization
from tensorflow.keras.regularizers import l2