Commit 0bf6cef7 authored by Dustin L. Howett's avatar Dustin L. Howett Committed by Dustin Howett

move everything else into profile.d

parent e88b60e0
function Get-InstalledSoftware {
<#
<#
.SYNOPSIS
Pull software details from registry on one or more computers
......@@ -164,4 +163,3 @@
}
}
}
}
\ No newline at end of file
If ($null -Ne (Get-Command -All gvim -EA:Ignore)) {
New-Alias -Name vim -Value gvim
}
function Send-Ghostbin {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[String]
$Body
)
$webSession=@{MaximumRedirection = 0}
$POSTBody=@{text=$Body; lang="text"}
$resp=Invoke-WebRequest -URI "https://ghostbin.com/paste/new" -Method POST -Body $POSTBody -WebSession $webSession
$path=$resp.Headers.Location.Split("/")
[PSCustomObject]@{
PasteID=$path.Get($path.Length-1)
URL="https://ghostbin.com/"+$resp.Headers.Location
}
}
\ No newline at end of file
ForEach($i In (Get-ChildItem (Join-Path (Split-Path $Profile.CurrentUserAllHosts) profile.d) -Filter:*.ps1 -EA:Ignore)) {
. ($i.FullName)
}
. "$(Split-Path $PROFILE)\Get-InstalledSoftware.ps1"
. "$(Split-Path $PROFILE)\powercat.ps1"
. "$(Split-Path $PROFILE)\ghostbin.ps1"
Function Add-MSHeader {
Param (
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$Files
)
ForEach($file in $Files) {
Set-Content -Path $file -Value @"
//******************************************************************************
//
// Copyright (c) Microsoft. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//******************************************************************************
"@
}
}
New-Alias -Name ms -Value Add-MSHeader
New-Alias -Name vim -Value gvim
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment