Skip to content

Instantly share code, notes, and snippets.

View KunalSin9h's full-sized avatar

Kunal Singh KunalSin9h

View GitHub Profile

For Arch linux, Install qemu-full

sudo pacman -S qemu-full

Now create an image

qemu-img create -f qcow2 {LinuxDistro}Image.img 10G
@KunalSin9h
KunalSin9h / bash_strict_mode.md
Created August 3, 2023 15:39 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
  1. Make a tarball, i.e create a file out of a folder
tar cf x.tar x
  1. Compress it with gzip
gzip x.tar
@KunalSin9h
KunalSin9h / Creating an AUR Package.md
Created May 9, 2023 08:02 — forked from keilmillerjr/Creating an AUR Package.md
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD

Get List of nodes in the Cluster

# Kubernetes
kubectl get nodes

# Docker Swarm 
docker node ls

Enable night light

xflux -l -77.9527 -g 166.4895 -k 3200

Apache Bench

Install

sudo apt install apache2-utils

use

ab -n 100 -c 10 https://api.kunalsin9h.com/

Editing remote files in Vim with SSH

  1. Configure SSH

    In ~/.ssh/config, include the lines:

    Host *
    ControlPath ~/.ssh/sockets/%r@%h-%p
    
@KunalSin9h
KunalSin9h / git-tricks.md
Last active March 21, 2023 11:44
Some useful git commands and tricks.

how to properly rename a directory?

Simple

git mv <old_name> <new_name>

Case sensitive rename—eg. from casesensitive to CaseSensitive—we must use a two step

git mv ab tmp
# These are the fixex for general Docker swarn problems