Skip to content

Instantly share code, notes, and snippets.

View amgdy's full-sized avatar
πŸ‘¨β€πŸ’»

Ahmed Magdy πŸ‡ͺπŸ‡¬ amgdy

πŸ‘¨β€πŸ’»
View GitHub Profile
@nblumhardt
nblumhardt / Program.cs
Last active January 12, 2025 19:31
Enrich.WithCaller()
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using Serilog;
using Serilog.Configuration;
using Serilog.Core;
using Serilog.Events;
namespace ConsoleApp24
@cmw2
cmw2 / Startup.cs
Created February 15, 2019 20:43
OWIN Startup class to use AAD.
using Owin;
namespace WindowsAuthAppToAADDemo
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}

This Gist file is dedicated for the Ask me anything session. The next session will be on the June 7th - 12:00 AM Tunis localtime.

Just ask your question here 😁

See you soon ! πŸ™‹

public static void RunAsDesktopUser(string fileName)
{
if (string.IsNullOrWhiteSpace(fileName))
throw new ArgumentException("Value cannot be null or whitespace.", nameof(fileName));
// To start process as shell user you will need to carry out these steps:
// 1. Enable the SeIncreaseQuotaPrivilege in your current token
// 2. Get an HWND representing the desktop shell (GetShellWindow)
// 3. Get the Process ID(PID) of the process associated with that window(GetWindowThreadProcessId)
// 4. Open that process(OpenProcess)
@paulyuk
paulyuk / dotnetconf2024-samples.md
Last active December 2, 2024 09:24
Samples - .NET Conf 2024 Building and Scaling Intelligent Apps

Samples for Building and Deploying Cloud Native Intelligent Apps

.NET Conf 2024

by Scott Hunter @coolcsh and Paul Yuknewicz @paulyuk

Here are all the demos shown in our session with full repos, azd templates, and a few notes. Enjoy, and let us know what you think! -- Scott and Paul

Part 1 - Aspire 9 & Functions