Skip to content

Instantly share code, notes, and snippets.

View stephengodbold's full-sized avatar

Steve Godbold stephengodbold

View GitHub Profile
#requires -Version 2.0
param(
[Parameter(Mandatory=$true)]
[string]
$databaseRootDirectory
)
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
$fileGroupSpecification = "ON [PRIMARY]"
#requires -Version 2.0
param(
[Parameter(Mandatory=$true)]
[string]
$databaseRootDirectory
)
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
$fileGroupSpecification = "ON [PRIMARY]"
@stephengodbold
stephengodbold / merge-local-branches.ps1
Created July 23, 2012 06:35 — forked from aaronpowell/.gitconfig
Script to cleanup merged branches locally
function Cleanup-GitBranches()
{
$branches = git branch --merged | ?{$_ -notmatch "\* master"} | ?{$_ -notmatch "master"} | ?{$_ -notmatch "\* *"} | %{$_.Trim() }
if (-not $branches) {
Write-Host "No merged branches detected"
return
}
Write-Host $branches
@stephengodbold
stephengodbold / killscc.ps1
Last active September 25, 2015 18:48 — forked from jstangroome/killscc.ps1
Removes source control bindings, and optionally backs up the original files
#requires -version 2.0
param (
[ValidateScript({$_ | Test-Path -PathType Container})]
[Parameter(Mandatory=$true)]
[string] $folder,
[switch] $backup
)
function killScc(){
gci -path $folder -i *.vssscc,*.vspscc -recurse | Remove-Item -force -verbose