Skip to content

Instantly share code, notes, and snippets.

View shubham-gaur's full-sized avatar
:octocat:
Catching Up...

Shubham Gaur shubham-gaur

:octocat:
Catching Up...
View GitHub Profile
@shubham-gaur
shubham-gaur / .vimrc
Created May 28, 2024 18:27
Vim Configuration
" Enable type file detection. Vim will be able to try to detect the type of file in use.
filetype on
" Enable plugins and load plugin for the detected file type.
filetype plugin on
" Load an indent file for the detected file type.
filetype indent on
" Turn syntax highlighting on.
@shubham-gaur
shubham-gaur / .tmux.conf
Created May 28, 2024 18:15
Tmux Configuration
# set command prefix for tmux
set-option -g prefix C-a
unbind C-a
# set default shell to zsh
set-option -g default-shell /usr/bin/bash
set -g default-terminal screen-256color
# 0 is too far from ` ;)
set -g base-index 1
@shubham-gaur
shubham-gaur / gitcoutlatest
Last active March 27, 2021 11:56
gitCheckoutLatest.sh
#!/bin/sh
# git version 2.29.3
GIT_VER=2.29.3
if [ -z $1 ]; then
echo "Last tested version: ${GIT_VER}"
echo "Please check for help -h|--help"
exit 0
fi
#__________Arguments Check___________________
@shubham-gaur
shubham-gaur / removeCRLF.sh
Last active March 4, 2021 14:00
Remove CRLF line endings with respect to all files in the directory/ies (recursively)
#!/bin/bash
# Does not work with file name spacing
find . -not -type d -exec file "{}" ";" | grep CRLF > $PWD/dos.txt
if [ -s $PWD/dos.txt ]
then
echo -n "Converting files..."
dos2unix $(cut -f 1 -d ':' $PWD/dos.txt)
else
echo -n "Dos file empty"
fi
@shubham-gaur
shubham-gaur / genRootCA.sh
Created March 4, 2021 10:36
Openssl CA Cert Generation
#!/bin/bash
openssl req -newkey rsa:2048 -nodes -sha256 -keyout ca.key -x509 -days 3650 -out ca.crt