Skip to content

Instantly share code, notes, and snippets.

View MM25Zamanian's full-sized avatar
🥲
Death Wish

S. MohammadMahdi Zamanian MM25Zamanian

🥲
Death Wish
View GitHub Profile
function logo
# Define Variables
set windowWidth (tput cols)
set windowHeight (tput lines)
set windowMinViewport (math min "$windowWidth, $windowHeight")
set showLogo test $windowWidth -gt 50 -a $windowHeight -gt 20
if $showLogo
set logoWidth 34
set logoHeight 18
[alias]
c = commit -m
ca = commit -am
cl = clone
cl1 = clone --depth=1
cb = "!git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == \"[gone]\" {sub(\"refs/heads/\", \"\", $1); print $1}'); do git branch -D $branch; done" # clean branch
pl = pull --prune --progress --autostash --rebase
p = push
pp = push --prune
pa = push --all
@MM25Zamanian
MM25Zamanian / .zshrc
Last active August 20, 2022 19:54
ZSH Config
export ZSH="/home/zamanian/.oh-my-zsh"
export LANG=en_US.UTF-8
ZSH_THEME=refined
VSCODE=code-insider
plugins=(
aliases
archlinux
@MM25Zamanian
MM25Zamanian / Convert2SimpleText.js
Created January 4, 2022 11:15
Remove useless letter and convert to simple text with javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Convert2SimpleText = void 0;
exports.Convert2SimpleText = function (word) {
return (word
.replaceAll('\u0610', '') //ARABIC SIGN SALLALLAHOU ALAYHE WA SALLAM
.replaceAll('\u0611', '') //ARABIC SIGN ALAYHE ASSALLAM
.replaceAll('\u0612', '') //ARABIC SIGN RAHMATULLAH ALAYHE
.replaceAll('\u0613', '') //ARABIC SIGN RADI ALLAHOU ANHU
.replaceAll('\u0614', '') //ARABIC SIGN TAKHALLUS
@MM25Zamanian
MM25Zamanian / python_app_starter.py
Created January 4, 2022 11:07
Python Application Starter
def main():
print("Python Application Run")
## Write Python Application:
if __name__ == "__main__":
main()
@MM25Zamanian
MM25Zamanian / star_center.jl
Last active January 4, 2022 10:53
Julia Language: Print Center Star With *n Number
function star_center(n)
for i = 1:2:n
print(repeat(' ', Int(ceil((n - i) / 2))))
print(repeat('*', i))
println(repeat(' ', Int(ceil((n - i) / 2))))
end
end
star_center(10)