Skip to content

Instantly share code, notes, and snippets.

View JaimeStill's full-sized avatar
👽

Jaime Still JaimeStill

👽
  • Arma Global / General Dynamics
  • Fayetteville, NC
View GitHub Profile
@JaimeStill
JaimeStill / New-GuidToClipboard.ps1
Created April 23, 2024 19:57
Generate a Guid to the Clipboard
(New-Guid).ToString() | Set-Clipboard
@JaimeStill
JaimeStill / home.route.html
Last active April 19, 2024 15:05
Signal-based Query Processor
<h1 class="mat-title m8">Home</h1>
<button mat-button class="m8" (click)="search()">Search</button>
@JaimeStill
JaimeStill / Program.cs
Created March 25, 2024 20:41
Extract SQL Image Hex string to File
const string BaseData = "0xFFD8FFE0..."
await ConvertToImage("data", BaseData);
static async Task ConvertToImage(string file, string hex)
{
string format = GetFormat(hex);
byte[] data = Convert.FromHexString(hex.Remove(0, 2));
await File.WriteAllBytesAsync($"{file}{format}", data);
}
@JaimeStill
JaimeStill / api-ca-certificates.md
Created January 30, 2024 15:09
Register CA Certificates in .NET Web API Docker Image

Register CA Certificates in .NET Web API Docker Image

Create a .crt file in the root of the API project that contains the CA certificates.

Use the following Dockerfile configuration:

FROM mcr.microsoft.com/dotnet/sdk:latest AS base
WORKDIR /app
@JaimeStill
JaimeStill / cached-mat-tab.html
Created November 29, 2023 20:38
Cache MatTabGroup selection with Router QueryParams
<mat-tab-group [animationDuration]="180"
[selectedIndex]="tabIndex"
(selectedIndexChange)="changeTab($event)">
<mat-tab label="One">
Tab One
</mat-tab>
<mat-tab label="Two">
Tab Two
</mat-tab>
<mat-tab label="Three">
@JaimeStill
JaimeStill / readme.md
Last active September 18, 2023 13:18
.NET SQL Server Codespace Configuration

.NET SQL Server Codespace Configuration

File Hierarchy:

  • .devcontainer
    • mssql
      • installSQLtools.sh
      • postCreateCommand.sh
      • setup.sql
    • devcontainer.json
@JaimeStill
JaimeStill / readme.md
Created August 24, 2023 16:17
Using Pandoc to convert MD to PDF
@JaimeStill
JaimeStill / readme.md
Created July 18, 2023 17:48
Flatten a list within a list into a projection of objects

Project Items From a Sub-List

Initial Data Source

Dictionary<KeyValuePair<string, string>, List<string>> PropertyMap = new()
{
    { new("PACKAGE_TYPE", "PackageType"), new() },
    { new("TURNAROUND_TIME", "TurnaroundTime"), new() },
    { new("TRACKING", "Tracking"), new() }
@JaimeStill
JaimeStill / AppServiceRegistrant.cs
Last active March 16, 2023 19:11
Service Registration via Reflection in .NET
using Microsoft.Extensions.DependencyInjection;
namespace App.Services;
public class AppServiceRegistrant : ServiceRegistrant
{
public AppServiceRegistrant(IServiceCollection services)
: base(services) { }
public override void Register()
{

git SSH on Windows

ssh-keygen -t ed25519 -C "email@example.com"
# enter a file in which to save the key (/c/Users/YOU/.ssh/ed25519):[Press enter]
# enter passphrase(empty for no passphrase): [Type a passphrase]
# Enter same passphrase again: [Type passphrase again]

# from admin powershell
Get-Service -Name ssh-agent | Set-Service -StartupType Manual