Various PowerShell scripts
MIT License
Various PowerShell scripts
Install starship via winget
winget install --id Starship.Starship
Clone the repository
git clone https://github.com/aminya/AcutePowerShell
cd AcutePowerShell
Now run the script:
Import-Module ./index.psm1 -DisableNameChecking
After you cloned the repository, open your profile:
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $PROFILE
Append the script to the profile
Import-Module "path-you-cloned-the-repo/index.psm1" -DisableNameChecking
props
get
which
whichall
rmrf
ls_size
dump_bin
br
find_symlink
set_symlink_target
replace_symlink_target
abspath
wget
btime
benchmark
git_rm_merged
git_reset
git_up
video_replace_audio
video_extract_audio
cmake_configure
cmake_build
Now the following functions are available in your session:
props
:obj | props
get
:obj | get propname
which
:which clang
whichall
:whichall clang
find_symlink
find_symlink .
find_symlink . --recursive
set_symlink_target
set_symlink_target path target
set_symlink_target ./folder1/mylink ./folder2/mylink
replace_symlink_target
replace_symlink_target path old new
replace_symlink_target ./folder1/mylink folder1 folder2
abspath
:btime
:btime { node -v }
benchmark
:benchmark { node -v }
You can change the count number by passing a number as the 2nd parameter
benchmark { node -v } 20
Measure-These
:https://www.powershelladmin.com/wiki/PowerShell_benchmarking_module_built_around_Measure-Command
git_rm_merged
:Go to the root of the git repo and then:
git_rm_merged
git_reset
:git_reset
Specifying repo and branch:
git_reset("upstream", "master")
git_up
:git_up
git_up origin master
-video_replace_audio
:
Batch replace the audio of video files in the current folder
video_replace_audio
video_replace_audio mp4 mp3
-video_extract_audio
:
Batch extract the audio of video files in the current folder
video_extract_audio
video_extract_audio mp4 mp3