Skip to content

Instantly share code, notes, and snippets.

@IDK9911
IDK9911 / Readme.md
Created March 25, 2023 11:13
How to work with decorators and Override function in python

image

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

image

@IDK9911
IDK9911 / 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/
@IDK9911
IDK9911 / 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

@IDK9911
IDK9911 / 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
@IDK9911
IDK9911 / 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
@IDK9911
IDK9911 / .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
@IDK9911
IDK9911 / .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(){