Skip to content

Instantly share code, notes, and snippets.

View peteraritchie's full-sized avatar
😖

Peter Ritchie peteraritchie

😖
View GitHub Profile
@jdhitsolutions
jdhitsolutions / Send-MastodonPost.ps1
Created December 21, 2022 20:19
A PowerShell function to post a Mastodon status.
#requires -version 5.1
<#
Based on a function from https://gist.github.com/dhmacher/2203582502c7ab13015db8f52e94da45
You need an access token that has at least write access to your status
* go to settings -> Development
* Click "New Application"
* Enter a name
@darrelmiller
darrelmiller / NewWebAppRegistration.ps1
Last active September 5, 2023 16:46
Use Microsoft Graph PowerShell to create an Application Registration for an ASP NET Web Site using Auth Code Grant
# updated to remove my really ugly first attempt, based on awesome feedback provided.
$web = @{
RedirectUris = "https://localhost:5001/signin-oidc"
ImplicitGrantSettings = @{ EnableIdTokenIssuance = $true }
}
$createAppParams = @{
DisplayName = "AspNetWebApp"
Web = $web
@dknoodle
dknoodle / Windows Defender Exclusions VS 2017.ps1
Last active April 13, 2024 18:55
Adds Windows Defender exclusions for Visual Studio 2017
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@aelij
aelij / RoslynReflection.cs
Last active November 5, 2019 23:12
Reflection using Roslyn (without loading assemblies into the app domain)
var compilation = CSharpCompilation.Create("C")
.AddReferences(MetadataReference.CreateFromFile(pathToAssembly));
foreach (var type in
from assemblySymbol in compilation.SourceModule.ReferencedAssemblySymbols
from module in assemblySymbol.Modules
from n in module.GlobalNamespace.GetMembers()
where n.IsNamespace
from type in n.GetTypeMembers()
select type)
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@mjeaton
mjeaton / ThroatPunchList.md
Last active May 3, 2024 23:01
Jerk faces who need to receive throat punches

On October 30, 2023, the Throat Punch List turned 10! In honor of that occasion, I'm putting some old favorites back on the list!

  1. Jeff Fritz
  2. Anyone that uses ask as a noun or that says stuff like "solutioning a problem"
  3. Jim Holmes
  4. Darby
  5. Tim
  6. Strauss
  7. JB
@clemensv
clemensv / gist:4253067
Created December 10, 2012 20:21
ForwardTo with Topics and Session Queues
namespace ConsoleApplication2
{
using System;
using System.Configuration;
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;
class Program
{
static void Main(string[] args)
@clemensv
clemensv / gist:4252776
Created December 10, 2012 19:33
ForwardTo Minimal Sample
namespace ConsoleApplication2
{
using System;
using System.Configuration;
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;
class Program
{
static void Main(string[] args)
@P4
P4 / default.reg
Last active April 13, 2024 05:23
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE