Last active
August 19, 2024 10:51
-
-
Save aquacash5/582bb0869e029f3ab6a972982c260f9a to your computer and use it in GitHub Desktop.
Shell defaults and aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash aliases for Linux | |
alias prp='pipenv run python' | |
alias ytdl='youtube-dl' | |
alias ytmp3='youtube-dl --extract-audio --audio-format mp3 --output "%(title)s.%(ext)s"' | |
alias ..='cd ..' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Profile addition for WSL | |
# Create Symlink between Windows home directory and Linux home directory | |
ln -s /mnt/c/Users/kbloom ~/win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ll="ls -laG" | |
git-branch-cleanup() { | |
git branch | awk '{$1=$1};1' | grep -v '^\*\|main|master\|dev' | xargs git branch -D | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Powershell Profile | |
###################### | |
# Location: $PROFILE.CurrentUserAllHosts | |
# Permission: Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser | |
# Aliases | |
Set-Alias touch Touch-File | |
Set-Alias ytdl youtube-dl | |
Set-Alias zip Compress-Archive | |
Set-Alias unzip Expand-Archive | |
# Alias Fuctions | |
Function ll { Get-ChildItem -Force } | |
Function which($name) { Get-Command $name | Select-Object -ExpandProperty Definition } | |
Function prp { pipenv run python $args } | |
Function .. { cd .. } | |
Function em { elm-make $args } | |
Function ytmp3 { youtube-dl --extract-audio --audio-format mp3 --output "%(title)s.%(ext)s" $args } | |
Function git-branch-cleanup { git branch | %{ $_.Trim() } | ?{ $_ -notmatch '(^\*|main|master|dev)' } | %{ git branch -D $_ } } | |
# Functions | |
Function Touch-File | |
{ | |
$file = $args[0] | |
if($file -eq $null) { | |
throw "No filename supplied" | |
} | |
if(Test-Path $file) { | |
(Get-ChildItem $file).LastWriteTime = Get-Date | |
} else { | |
New-Item -ItemType File -Force -Path $file | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment