Skip to content

Instantly share code, notes, and snippets.

View Tiberriver256's full-sized avatar
📚
Still learning

Micah Rairdon Tiberriver256

📚
Still learning
View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active April 22, 2024 16:22
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@Tiberriver256
Tiberriver256 / PSWebServer.psm1
Last active March 6, 2024 03:49
Sample of making a simple webserver in PowerShell. If you have more complex needs checkout Pode (https://github.com/Badgerati/Pode) as a fully fledged PowerShell web server.
Function New-PSWebServer {
<#
.Synopsis
Creates a web server that will invoke PowerShell code based on routes being asked for by the client.
.Description
New-PSWebServer creates a web server. The web server is composed of a schema that defines the client's requests to routes where PowerShell code is executed.
Under the covers, New-PSWebServer uses the HTTPListener .NET class to execute powershell code as requested, retrieves the results and sends data back through the httplistener web server framework.
@AlbertoMonteiro
AlbertoMonteiro / 01.md
Last active January 23, 2024 10:11
Migration from Moq to NSubstitute