Skip to content

Instantly share code, notes, and snippets.

@mavaji
mavaji / Arrows in Markdown.md
Created April 23, 2022 09:48
Arrows in Markdown
  • Up arrow (↑): ↑
  • Down arrow (↓): ↓
  • Left arrow (←): ←
  • Right arrow (→): →
  • Double headed arrow (↔):
@mavaji
mavaji / gitconfig.md
Created April 19, 2022 00:17
Different gitconfig for a custom folder and its subfolders
[includeIf "gitdir:~/Developer/sandbox/**"]
    path = ~/Developer/sandbox/.gitconfig
@mavaji
mavaji / Arabic Letters.md
Created April 17, 2022 05:59
Arabic Letters

ۀ ك ي

@mavaji
mavaji / Git extract subdirectory.md
Created April 17, 2022 05:58
Git extract subdirectory
git filter-repo --subdirectory-filter <folder_name>
@mavaji
mavaji / vim shortcuts.md
Created April 17, 2022 05:56
vim shortcuts
command description
0 move to beginning of the current line
$ move to end of line
H move to the top of the current window (high)
M move to the middle of the current window (middle)
L move to the bottom line of the current window (low)
1G move to the first line of the file
20G move to the 20th line of the file
G move to the last line of the file
@mavaji
mavaji / Latex.md
Last active April 17, 2022 05:58
Latex
for i in {3..361}; do echo '\section{}' >> hint$i.tex;echo "\paragraph{}\label{hint:${i}}" >> hint$i.tex; done

for i in {11..115}; do echo '\section{}' >> answer$i.tex;echo "\paragraph{}\label{answer:${i}}" >> answer$i.tex; done
@mavaji
mavaji / Count in log file.md
Last active April 17, 2022 05:57
Count in log file
awk '{print $9}' access.log | sort | uniq -c | sort -rn
@mavaji
mavaji / Change Git Author Commiter.md
Last active April 17, 2022 05:57
Change Git Author Commiter
git filter-branch --env-filter '
OLD_EMAIL="old_email"
CORRECT_NAME="Author Name"
CORRECT_EMAIL="new_email"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi