Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johndevedu/3303a3861684fc1f34c29e86eb282377 to your computer and use it in GitHub Desktop.
Save johndevedu/3303a3861684fc1f34c29e86eb282377 to your computer and use it in GitHub Desktop.
Powershell Profile
#$snapins = Get-PSSnapin -Registered
#$snapins | Add-PSSnapin
#Get-Module -ListAvailable | Import-Module
#Get-PSSnapin | Format-Table -autosize PSVersion, Name
#Get-Module | Format-Table -autosize ModuleType, Name
function ff ([string] $glob) { get-childitem -recurse -include $glob }
function osr { shutdown -r -t 5 }
#function osh { shutdown -h -t 5 }
#function rmd ([string] $glob) { remove-item -recurse -force $glob }
function whoami { (get-content env:\userdomain) + "\" + (get-content env:\username); }
#function strip-extension ([string] $filename)
#{
# [system.io.path]::getfilenamewithoutextension($filename)
#}
function gotocode{set-location C:\sf.code}
function gotoprofile{set-location C:\Users\john lee\Documents\}
function gotodownloads{set-location "C:\Users\john lee\Downloads"}
set-alias npp "C:\Program Files (x86)\Notepad++\notepad++.exe"
set-alias grep select-string
set-alias pr gotoprojects
set-alias downloads gotodownloads
set-alias profile gotoprofile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment