Skip to content

Instantly share code, notes, and snippets.

View cameronove's full-sized avatar

Cameron cameronove

  • New Jersey
View GitHub Profile
@cameronove
cameronove / ps_git_prompt.ps1
Last active March 13, 2018 19:28
PowerShell prompt to emulate Git-Bash prompt.
function prompt {
$NearestGitRepo = $null
$Folder = $pwd.Path
do{
if(Test-Path $Folder\.git){
$NearestGitRepo = $Folder
}
$Folder = Split-Path $Folder
}until($NearestGitRepo -or $Folder -eq '')
@cameronove
cameronove / BoxOAuth2Functions.psm1
Last active August 29, 2015 14:03
Set of PowerShell functions that allow you to register a Box app on your computer and obtain and user access tokens in order to preform work on Box.com objects.
<#
Author: Cameron Ove
Modified: July 8, 2014
FileName: BoxOAuth2Functions.psm1
Revision: 0.2
Change Log:
Removed reference to RegEditSuit.psm1
No longer need to import the above module to use these functions.
Used PowerShell reg provider to access registry.
@cameronove
cameronove / RegEditSuite.psm1
Created June 28, 2014 15:18
PowerShell module to manage Windows Registry.
<#
2010 Scripting Games PowerShell: Advanced Event 1
Author: Cameron Ove
Date: 4/30/2010
Copyright: NONE :-D
Synopsis of functions:
I really wanted to the ability to provide credentials when contacting remote workstations.
.Net seems limited in that regard. So I used WMI.
In paticular I used the root\default namespace and StdRegProv thus enabing the ability for credentials across the network.