Skip to content

Instantly share code, notes, and snippets.

@ddpruitt
ddpruitt / docker-compose.yaml
Created June 28, 2024 00:42 — forked from dbafromthecold/docker-compose.yaml
Spinning SQL Server 2019 up with docker-compose
version: '3.7'
services:
sqlserver1:
build:
context: .
dockerfile: dockerfile
ports:
- "15789:1433"
env_file:
@ddpruitt
ddpruitt / line_follower.py
Created February 29, 2024 02:58 — forked from CS2098/line_follower.py
A LEGO Mindstorms ev3 line follower program in Python
# line_follower.py
# by: Carl Strömberg
# Import the EV3-robot library
import ev3dev.ev3 as ev3
from time import sleep
class LineFollower:
# Constructor
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@ddpruitt
ddpruitt / transform-xml.ps1
Created January 17, 2024 20:02 — forked from sayedihashimi/transform-xml.ps1
Script which can be used to transform an XML file using XDT. All you need to do is download the script and call it. The script will download the files it needs to run.
#!/usr/bin/env powershell
<#
.SYNOPSIS
You can use this script to easly transform any XML file using XDT.
To use this script you can just save it locally and execute it. The script
will download its dependencies automatically.
Created by sayediHashimi
Modified by obscurerichard
Thanks Stack Overflow: https://stackoverflow.com/questions/8989737/web-config-transforms-outside-of-microsoft-msbuild
class Package
{
[String]$id
[String]$version
[String]$targetFramework
[String]$path
}
function GatherPackageInfo([string]$path) {
$packages = @()
@ddpruitt
ddpruitt / docker-pull-images.ps1
Created October 17, 2023 12:41 — forked from DanielTheCoder/docker-pull-images.ps1
Docker update all images using PowerShell
# Pull all images based on https://gist.github.com/gte445e/85119eb6e93bd46fb2bbd3e3a362ce68
docker images --format "{{.Repository}}" | Where-Object {$_ -ne "<none>"} | %{Write-Host "Pulling image: $_ ..."; docker pull $_}
@ddpruitt
ddpruitt / Find-GitRepository.ps1
Created August 16, 2023 15:12 — forked from jdhitsolutions/Find-GitRepository.ps1
Use this PowerShell function to find Git repositories in the specified folder. It is assumed that you have the Git command line tools already installed.
Function Find-GitRepository {
<#
.SYNOPSIS
Find Git repositories
.DESCRIPTION
Use this command to find Git repositories in the specified folder. It is assumed that you have the Git command line tools already installed.
.PARAMETER Path
The top level path to search.
@ddpruitt
ddpruitt / ComparingDictionaries.linq
Created July 31, 2023 18:25
Comparing Dictionaries using LINQPad
var d1 = new Dictionary<int, string>
{
{0, "0" },
{1, "0" },
{2, "0" },
{3, "3" },
{4, "0" },
{5, "0" },
{10, "0" },
{11, "0" },

Creating a Pretty Prompt in Windows Termainal


posh-git

posh-git is a PowerShell module that integrates Git and PowerShell by providing Git status summary information that can be displayed in the PowerShell prompt.

posh-git also provides tab completion support for common git commands, branch names, paths and more. For example, with posh-git, PowerShell can tab complete git commands like checkout by typing git ch and pressing

@ddpruitt
ddpruitt / Ancient Greek Geometry.md
Created June 15, 2022 20:29 — forked from mrflip/Ancient Greek Geometry.md
Ancient Greek Geometry walkthrough / answers / cheats