Skip to content

Instantly share code, notes, and snippets.

Sam Gaulding sgaulding

  • KS, USA
Block or report user

Report or block sgaulding

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Get Latest 5 Directories.ps1
Get-ChildItem -Recurse -Directory | Select-Object @{Name="Count"; Expression={(Get-ChildItem $_.FullName -File).Count}}, @{Name="Directory"; Expression={$_.FullName}}, @{Name="LastWriteTime"; Expression={$_.LastWriteTime}} | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 10 | Format-Table
sgaulding / own.dg.theme
Last active Nov 21, 2019
SmartGit Dark Theme (SmartGit Version 17.1)
View own.dg.theme
# This file lists the color values of the default dark theme.
# Each line starting with a # is a comment.
# To overwrite certain colors remove the leading # and change the color values.
# The "extends" line defines which color definitions to use if none is found here.
# The "preferredEditorTheme" line determines what editor theme should be used by default ('light' or 'dark').
sgaulding / .gitcommittemplate
Created Feb 10, 2017
GIT Comment Template
View .gitcommittemplate
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# You MUST wrap all lines at 72 characters.
# ==[ Subject: <type>(<scope>): <subject> ]======|
# ==[ Blank: Follow the Subject with a blank line, do NOT remove ]=====|
sgaulding / LogHelper.cs
Created Nov 9, 2016
NCrunch Log4Net Helper
View LogHelper.cs
using log4net;
using log4net.Appender;
using log4net.Core;
using log4net.Layout;
using log4net.Repository.Hierarchy;
namespace Tests.Helper
public class Logger
sgaulding / VisualStudioClean.ps1
Last active Mar 15, 2017
Clean up Visual Studio directories
View VisualStudioClean.ps1
Get-ChildItem -inc bin,obj -rec | Remove-Item -rec -force
Get-ChildItem -inc bin,obj -rec | ? { $_.PsIsContainer -and $_.FullName -notmatch 'node_modules' } | ? { Remove-Item $_.FullName -rec -force }
View SlackPost.ps1
$slackMessage = "Test Message"
$postSlackMessage = @{token="{token}";channel="{channel}";username="{user}";text=$slackMessage;icon_emoji=":loudspeaker:";}
Invoke-RestMethod -Uri -Body $postSlackMessage
sgaulding / SQLRestorefromBackup.Bat
Created Jul 31, 2014
Command Prompt MS-SQL Restore from Backup
View SQLRestorefromBackup.Bat
rem ******************************************* Use Master
SqlCmd -E -S localhost -Q "USE MASTER"
rem ******************************************* Restoring <Database Name> database
del " <Database Backup Full File Name>.bak"
You can’t perform that action at this time.