Skip to content

Instantly share code, notes, and snippets.

Avatar
🍄
Hello!

Fahim Ali Zain fahimalizain

🍄
Hello!
View GitHub Profile
@fahimalizain
fahimalizain / .bashrc
Created Jun 21, 2021
Beautiful bash-alias
View .bashrc
RED='\033[0;31m'
DARK_GRAY='\033[1;30m'
NC='\033[0m' # No Color
make_alias() {
echo -e "\tALIAS\t${RED}$1\n\t\t${DARK_GRAY}$2${NC}"
alias $1="echo -e \"\n\t${DARK_GRAY}$2${NC}\n\" && $2"
}
make_alias wsl2_drop_cache 'echo 3 | sudo tee /proc/sys/vm/drop_caches'
View frappe_v10_v11.sh
#!/bin/bash
mysqlPWD=frappe
if [ "$#" -ne 3 ]; then
echo "Please pass the v10 URL, sitename and the backup timestamp"
exit
fi
if [ ! -d "./v10-data" ]; then
@fahimalizain
fahimalizain / negate_bootstrap_container.scss
Created Feb 20, 2019
Negate bootstrap .container fixed widths. This helps to span any element across the screen, even though its inside a .container without using position absolute or fixed
View negate_bootstrap_container.scss
.spread-screen {
width: 100vh;
// bootstrap 4
// the following are referenced from bootstrap.scss/_grid.scss
// mixins/_grid.scss @make-container @make-container-max-widths mixins
margin-left: -$spacer;
@each $breakpoint, $container-max-width in $container-max-widths {
@fahimalizain
fahimalizain / brute_force_excel.py
Created Feb 18, 2019
Brute force excel file with file level encryption
View brute_force_excel.py
import pandas as pd
import win32com.client
import string, sys
xlApp = win32com.client.Dispatch("Excel.Application")
print("Excel library version:", xlApp.Version)
path = "Statement.xlsx"
tokens = [str(x) for x in list(range(0,4))]
# tokens.extend([x for x in string.ascii_lowercase])