Skip to content

Instantly share code, notes, and snippets.

View trossr32's full-sized avatar
🤿
I'd rather be diving

Rob Green trossr32

🤿
I'd rather be diving
View GitHub Profile
@codebykyle
codebykyle / connect.ps1
Last active May 8, 2024 04:07
Windows Terminal Split Pane Powershell Script - v2
using namespace System.Collections.Generic
# Encapsulate an arbitrary command
class PaneCommand {
[string]$Command
PaneCommand() {
$this.Command = "";
}
@manoj-choudhari-git
manoj-choudhari-git / CampContextFactory.cs
Created June 18, 2021 10:13
.NET Core - Entity Framework Core - IDesignTimeDbContextFactory Implementation
public class CampContextFactory : IDesignTimeDbContextFactory
{
public CampContext CreateDbContext(string[] args)
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.Build();
var dbContextBuilder = new DbContextOptionsBuilder();
@Fireforge
Fireforge / backup.ps1
Last active April 2, 2024 15:34
Powershell backup script using Robocopy
#
# ROBOCOPY Script
#
# This script calls robocopy over a few folders, and then emails you when they're done
Param(
[Parameter(Mandatory=$true)]
[string]$basesrc, #"G:\",
[Parameter(Mandatory=$true)]
[string]$basedst, #
@mikernet
mikernet / MethodBindingExtension.cs
Last active July 2, 2024 08:56
Updated Ultimate WPF Method Binding Extension
// Updated Ultimate WPF Event Method Binding implementation by Mike Marynowski
// View the article here: http://www.singulink.com/CodeIndex/post/updated-ultimate-wpf-event-method-binding
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;