Skip to content

Instantly share code, notes, and snippets.

View mattcargile's full-sized avatar

Matthew A Cargile mattcargile

  • Baton Rouge, LA
View GitHub Profile
@mattcargile
mattcargile / Set-SsmsQueryShortcut.ps1
Created July 29, 2025 19:46
Set-SsmsQueryShortcut
<#
.SYNOPSIS
Set SQL Server Management Studio (SSMS) query shortcuts.
.DESCRIPTION
This script sets predefined query shortcuts in SQL Server Management Studio (SSMS) by modifying the UserSettings.xml file.
.EXAMPLE
Set-SsmsQueryShortcut
This command will set the predefined query shortcuts in SSMS.
@mattcargile
mattcargile / omp.json
Created June 11, 2025 19:27
oh-my-posh_theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"debug_prompt": {
"template": "<#FFA500,transparent>\uf188\u2800</><#046e29,transparent>\uf054</> ",
"foreground": "#ffffff",
"background": "transparent"
},
"secondary_prompt": {
"template": "\uf48b\uf460 ",
"foreground": "#046e29",
@mattcargile
mattcargile / Get-WTSSessionInfo.ps1
Last active August 1, 2024 14:54 — forked from jborean93/Get-WTSSessionInfo.ps1
Tries to replicate qwinsta but return structured objects
# Copyright: (c) 2022, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
<#Check if loaded to make dot-source testing easier#>
if(-not ('Wtsapi32.Native' -as [type])){
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
namespace Wtsapi32
<#
.SYNOPSIS
Get Installed Software
.DESCRIPTION
Gets uninstall registry location with the Registry library
.NOTES
Information or caveats about the function e.g. 'This function is not supported in Linux'
.LINK
https://github.com/SeeminglyScience/dotfiles/blob/eb62bb91eb889c290d607c8f57762a9ec1cedbe4/Documents/PowerShell/Utility.psm1#L327
.EXAMPLE
@mattcargile
mattcargile / Get-SmbShareRemote.ps1
Last active March 28, 2023 21:43 — forked from jborean93/Get-SmbShareInfo.ps1
Enumerates shares on a remote host
# Copyright: (c) 2020, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
function Get-SmbShareRemote {
<#
.SYNOPSIS
Enumerate shares on a remote host.
.DESCRIPTION
Enumerate shares on a remote host and returns the name, type, and special remark for those shares.
.PARAMETER ComputerName
@mattcargile
mattcargile / Search-Giphy.ps1
Last active August 19, 2024 18:51 — forked from JustinGrote/Search-Giphy.ps1
Get a random gif from Giphy. ***NOTE: Invoke-TerminalGif was moved to MSTerminalSettings module***
function Search-Giphy {
<#
.SYNOPSIS
Fetches Gif Information and direct Gif Links from Giphy, a meme delivery service
.DESCRIPTION
This is a frontend to the Giphy API to find and request gifs from Giphy. It implements the API described here: https://developers.giphy.com/docs/api/
.EXAMPLE
PS> Search-Giphy
Returns a random gif information object
title bitly_url username source