-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgig.ps1
More file actions
18 lines (16 loc) · 843 Bytes
/
gig.ps1
File metadata and controls
18 lines (16 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#For PowerShell v3
Function gig {
param(
[Parameter(Mandatory = $true)]
[string[]]$list
)
$params = ($list | ForEach-Object { [uri]::EscapeDataString($_) }) -join ','
Invoke-WebRequest -Uri "https://www.toptal.com/developers/gitignore/api/$params"
| Select-Object -ExpandProperty content | Out-File -FilePath $(Join-Path -Path $pwd -ChildPath '.gitignore') -Encoding ascii
}
gig -list visualstudio, visualstudiocode, rider, fsharp, powershell, macos, intellij+all
Add-Content -Path .\.gitignore -Value '# Repository Specific' -Encoding ascii
Add-Content -Path .\.gitignore -Value '.trash' -Encoding ascii
Add-Content -Path .\.gitignore -Value '*.received.*' -Encoding ascii
Add-Content -Path .\.gitignore -Value '*.received/' -Encoding ascii
Add-Content -Path .\.gitignore -Value '.idea/' -Encoding ascii