Skip to content

Commit 31bf251

Browse files
committed
Added my profile to the repo
1 parent 53ddb12 commit 31bf251

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

Profile.ps1

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
. $PSScriptRoot\Server_Functions.ps1
2+
. $PSScriptRoot\Private-Environment-Variables.ps1
3+
4+
if (Get-IsAdmin) {
5+
Write-Verbose "Admin shell detected, don't get weather info to save time."
6+
} else {
7+
. $PSScriptRoot\Get-Weather.ps1
8+
Get-Weather -City 'Fort%20Smith' -Country 'USA'
9+
}
10+
11+
function Get-ServerList() {
12+
Import-Clixml -Path $PSScriptRoot\Saved_Servers.xml
13+
}
14+
15+
if (Get-Module -ListAvailable -Name Gamgee) { Import-Module -Name Gamgee -Global }
16+
17+
function global:Prompt {
18+
# Set the title the current date and time
19+
$Host.UI.RawUI.WindowTitle = (Get-Date -UFormat '%y/%m/%d %R').Tostring()
20+
21+
Write-Host "$env:USERNAME@$env:COMPUTERNAME " -ForegroundColor Cyan -NoNewline
22+
Write-Host (Get-Location) -ForegroundColor Green
23+
Write-Host '[' -NoNewline
24+
Write-Host (Get-Date -UFormat '%T') -ForegroundColor Yellow -NoNewline
25+
Write-Host ']:' -NoNewline
26+
return "$ "
27+
}
28+
29+
30+
function Open-ProjectFolder () {
31+
[CmdletBinding()]
32+
[Alias('projects', 'Open-Projects')]
33+
param ()
34+
35+
Set-Location "D:\Development\Projects"
36+
}
37+
38+
function Format-Json([Parameter(Mandatory, ValueFromPipeline)][String]$json) {
39+
$json | ConvertFrom-Json | ConvertTo-Json
40+
}
41+
42+
function gimp() {
43+
param (
44+
$Version = '2.8'
45+
)
46+
if (Get-Command "gimp-$Version.exe" -ErrorAction SilentlyContinue) {
47+
gimp-2.8.exe
48+
}
49+
else {
50+
Write-Error "The previously stored gimp executable is no longer available. Please verify the version number is correct."
51+
}
52+
}

0 commit comments

Comments
 (0)