Skip to content

Instantly share code, notes, and snippets.

View kazimmsyed's full-sized avatar
💭
pushing and refactoring code.

Kazim Syed kazimmsyed

💭
pushing and refactoring code.
View GitHub Profile
@kazimmsyed
kazimmsyed / Readme.md
Created March 25, 2023 11:13
How to work with decorators and Override function in python

image

@kazimmsyed
kazimmsyed / .md
Created March 18, 2023 14:20
How to colorize output in python

image

@kazimmsyed
kazimmsyed / app.sh
Created March 6, 2023 17:41
Setting up my pyspark enviorment.
if [ -e log4j2.properties.template ];
then
echo "Renaming file"
chmod u+rwx log4j2.properties.template
mv log4j2.properties.template log4j2.properties
fi
sed '/Logger/{
s/info/ERROR/
@kazimmsyed
kazimmsyed / Readme.md
Created January 19, 2023 19:51
How to setup a sniping tool using Shortcuts for ur mac that saves images from ur clipboard and prompts u for name.

image

This is how the shortcut looks like

image

@kazimmsyed
kazimmsyed / paste_it.sh
Last active January 19, 2023 14:43
Setting up an automatic folder action that organizes ur downloads folder. In this, there is drop folder which gets triggered whenever there is transfer of a data of any format.
#Run shell script in automator and paste this code
shopt -s extglob; #to use regular expressions
echo hello
for f in "$@"
do
echo "$f"
stats=$(echo"")
case $f in
@kazimmsyed
kazimmsyed / Command Line
Last active January 9, 2023 11:16
To convert a csv file with the format of (e.g: master> git branch <branchname> INTO master> git branch branchname
% sed -n 's!<\([a-z]*\)>!\1!g;p' git_shortcuts.csv > git_final shortcut. exercises Mon 9
@kazimmsyed
kazimmsyed / .zlogin
Last active January 6, 2023 16:19
How to set bindkeys aka shortcuts to bigger text of code and setting the prompt and mysql. And how the zsh enviorment variables and other are loaded into the system and for user personal use.
% cat ~/.zlogin lily Patronus Fri 6
#setting mysql
path[8]=/usr/local/mysql/bin;
#Setting shell prompt
PROMPT="%{$fg[yellow]%}%n@%m%{$reset_color%} %~"$'\n'"%# "
#setting bindkey for mysql
@kazimmsyed
kazimmsyed / .zprofile
Last active January 6, 2023 16:19
How to setup a terminal that has a RPROMPT that informs about (git branch) we are.
eval "$(/opt/homebrew/bin/brew shellenv)"
#MINE
autoload -U colors && colors
RPROMPT="%{$fg[cyan]%} %c %w%{$reset_color%}"
#PROMPT is at zlogin
precmd(){