Skip to content

Instantly share code, notes, and snippets.

View itse4elhaam's full-sized avatar
🎯
Focusing

Elhaam Basheer Chaudhry itse4elhaam

🎯
Focusing
View GitHub Profile
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@itse4elhaam
itse4elhaam / .vimrc
Last active February 13, 2024 16:30
vim key bindings for vscode
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set foldmethod=manual
set foldcolumn=1
set clipboard+=unnamedplus
set signcolumn=number
set number
set relativenumber
@itse4elhaam
itse4elhaam / morgan-config.js
Created February 1, 2024 07:09
A standard morgan and chalk configuration for express logs
const morgan = require('morgan');
const chalk = require('chalk');
const { REQ_COLORS } = require('../lib/constants');
morgan.token('params', (req, res) => {
return JSON.stringify(req.params);
});
morgan.token('query', (req, res) => {
return JSON.stringify(req.query);
@itse4elhaam
itse4elhaam / .bashrc
Created January 15, 2024 06:51
Bash shorcuts
# Open the current directory in the file explorer
alias ex='explorer.exe .'
# Copy the current directory path to the clipboard
alias cpth='pwd | tr -d "\n" | xclip -selection clipboard'
# aliases for common win utilities
alias explorer='explorer.exe .'
alias notepad='notepad.exe'
alias edge='msedge.exe'
@itse4elhaam
itse4elhaam / git.config
Last active January 17, 2024 18:34
Git aliases
[alias]
ac = !git add -A && git commit -m
acp = "!f() { git add -A && git commit -m \"$1\" && git push origin $(git symbolic-ref --short HEAD); }; f"
pom = push origin master
po = push origin
pl = pull origin
st = status -sb
s = status
co = checkout
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate