Skip to content

Instantly share code, notes, and snippets.

@fdeitelhoff
Last active December 28, 2015 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fdeitelhoff/7483169 to your computer and use it in GitHub Desktop.
Save fdeitelhoff/7483169 to your computer and use it in GitHub Desktop.
PowerShell v3 script for gitignore.io.
#For PowerShell v3
Function gitignore {
Param(
[Parameter(Mandatory=$true)]
[string[]]$list
)
$params = $list -join ","
invoke-WebRequest -Uri "http://gitignore.io/api/$params" | select -expandproperty content | out-file -FilePath $(join-path -path $pwd -ChildPath ".gitignore") -Encoding ascii
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment