-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfile.ps1
More file actions
114 lines (91 loc) · 2.62 KB
/
Profile.ps1
File metadata and controls
114 lines (91 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
function prompt {
"`r`n`r`n$($executionContext.SessionState.Path.CurrentLocation)$(' ')`($(Get-Date -Format 'yyyy/MM/dd HH:mm:ss')`)`r`n$('>' * ($nestedPromptLevel + 1)) ";
}
function Set-GHQFolder {
$SelectedRepository = $(ghq list -p | peco)
Set-Location $SelectedRepository
}
function Install-WingetApp {
param (
[Parameter(Mandatory)][String]$AppId
)
&"winget" install $AppId --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity
}
function Update-WingetApp {
param (
[Parameter(Mandatory)][String]$AppId
)
&"winget" upgrade $AppId --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity
}
function Update-WingetAppAll {
&"winget" upgrade --all --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity
}
function Uninstall-WingetApp {
param (
[Parameter(Mandatory)][String]$AppId
)
&"winget" uninstall $AppId --silent --force --purge --accept-source-agreements --disable-interactivity
}
# function Get-SVNStatus {
# param (
# [Parameter(Mandatory)][String]$TargetDirPath
# )
# Set-Location -Path $TargetDirPath;
# &"svn" status
# }
function Set-StringForFileName {
param (
[Parameter(Mandatory)][String]$SourceString
)
$ReplacedString = "${SourceString}";
$ReplacedString = ("${ReplacedString}" -replace '[ \t!]', '_');
$ReplacedString = ("${ReplacedString}" -replace "['\?,:]", '');
return "${ReplacedString}" | Set-Clipboard -PassThru;
}
function New-DirectoryRecursively {
param (
[Parameter(Mandatory)][String]$RootDir,
[Parameter(Mandatory)][String]$RelativeDir
)
$ReplacedRelativeDir = ($RelativeDir -replace '[/\\]', '/');
New-Item -Path "${RootDir}" -Name ("${ReplacedRelativeDir}" -replace '/', [System.IO.Path]::DirectorySeparatorChar) -ItemType Directory -Force
}
function sshnc {
& ssh -o 'StrictHostKeyChecking no' @args
}
function scpnc {
& scp -o 'StrictHostKeyChecking no' @args
}
function dcup {
& docker compose up -d @args
}
function dcstart {
& docker compose start @args
}
function dcstop {
& docker compose stop @args
}
function dcdwn {
& docker compose down @args
}
function dclogs {
& docker compose logs @args
}
function dcps {
& docker compose ps @args
}
function dcexec {
& docker compose exec @args
}
function dccmp {
& docker compose @args
}
function gwt {
& git worktree @args
}
function grbxt {
.\gradlew -q build -x test
}
function grcmp {
.\gradlew -q compileJava compileTestJava
}