Skip to content

Instantly share code, notes, and snippets.

View swaters86's full-sized avatar
🏠
Kicking ass and taking names

Steve Waters swaters86

🏠
Kicking ass and taking names
View GitHub Profile
// =============================================================================
// CognitoTokenService.cs
// Self-contained Cognito client_credentials token fetcher.
// - IHttpClientFactory for connection management
// - SemaphoreSlim for thread-safe stampede prevention
// - Base URL defined at registration in Program.cs
// - In-memory cache with configurable buffer before expiry
//
// Program.cs registration:
// -------------------------------------------------
// =============================================================================
// EhrHttpClientSetup.cs
// Drop this file into a shared project (e.g. YourSolution.Shared or directly
// into each project that needs it). Call builder.AddEhrHttpClients() in
// Program.cs for both the API and Integration projects.
// =============================================================================
using System.Net;
using System.Net.Http.Headers;
using Microsoft.Extensions.DependencyInjection;
### **Soft Skills for This Individual**
#### **1. Communication Skills**
- **Strong Written Communication**: Excellent at crafting clear, concise, and professional messages via email and Teams, ensuring ideas and updates are understood.
- **One-on-One Communication**: Skilled at building rapport and effectively conveying ideas during phone calls or direct interactions, making them approachable and easy to work with.
- **Asynchronous Collaboration**: Thrives in environments that rely on written communication, like remote or hybrid teams.
---
#### **2. Problem-Solving**
private void FilterDate(FilterDescriptor filter, IQueryable<LogWithDetail> query, string columnName)
{
if (!string.IsNullOrEmpty(columnName) && filter.FilterValue != null)
{
// Get the property info dynamically from the column name
var propertyInfo = typeof(LogWithDetail).GetProperty(columnName);
if (propertyInfo != null && propertyInfo.PropertyType == typeof(DateTime))
{
// Parse the filter value to DateTime
# Replace placeholders with appropriate values
$serviceName = "YourServiceName"
$displayName = "Your Service Display Name"
$description = "This is the description of the service."
$executablePath = "C:\Path\To\YourExecutable.exe"
# Create the service
sc.exe create $serviceName binPath= "\"$executablePath\"" DisplayName= "\"$displayName\""
# Add a description (optional but recommended)
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Product
Name="Analyze Backfill Manager"
Id="*"
UpgradeCode="66fc43df-90cf-4913-bb94-e5211a057984"
Version="1.0.0.0"
Manufacturer="ABB Analyze"
Language="1033">
@echo off
echo Removing DLL files from Git tracking, but keeping them locally...
git rm --cached -r *.dll || echo *.dll files not found, continuing
echo Removing build directories from Git tracking...
git rm --cached -r [Dd]ebug/ || echo [Dd]ebug/ directory not found, continuing
git rm --cached -r [Dd]ebugPublic/ || echo [Dd]ebugPublic/ directory not found, continuing
git rm --cached -r [Rr]elease/ || echo [Rr]elease/ directory not found, continuing
git rm --cached -r [Rr]eleases/ || echo [Rr]eleases/ directory not found, continuing
git rm --cached -r x64/ || echo x64/ directory not found, continuing
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<!-- Define some basic settings -->
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Timers;
using log4net;
using log4net.Config;
class Program
{
private static readonly ILog log = LogManager.GetLogger(typeof(Program));
@swaters86
swaters86 / gist:afcea41de8c4cc8459635f4ce41d6233
Created January 14, 2024 04:42
Blade Template check if logged in user id is equal to the user id stored in a record column called user_id
<div>
@if(auth()->id() != $myrecord->user_id)
<p>Display stuff for logged in user</p>
@endif
</div>