Skip to content

Instantly share code, notes, and snippets.

View sojournercntl's full-sized avatar
🌌
at work

Marcus sojournercntl

🌌
at work
View GitHub Profile
@davidfowl
davidfowl / MinimalAPIs.md
Last active May 8, 2024 02:30
Minimal APIs at a glance
@therightstuff
therightstuff / RSAKeys.cs
Last active November 3, 2023 16:34
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{
@hansmaad
hansmaad / gist:9187633
Last active November 12, 2023 11:37
WPF Flat Combo Box Style
<!-- Flat ComboBox -->
<SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#e3e9ef" />
<SolidColorBrush x:Key="ComboBoxNormalBackgroundBrush" Color="#fff" />
<SolidColorBrush x:Key="ComboBoxDisabledForegroundBrush" Color="#888" />
<SolidColorBrush x:Key="ComboBoxDisabledBackgroundBrush" Color="#eee" />
<SolidColorBrush x:Key="ComboBoxDisabledBorderBrush" Color="#888" />
<ControlTemplate TargetType="ToggleButton" x:Key="ComboBoxToggleButtonTemplate">
<Grid>
<Grid.ColumnDefinitions>
@JoshClose
JoshClose / Example1.xml
Created November 15, 2011 17:15
Making a Custom Window Resizable in WPF
<aero:SystemDropShadowChrome CornerRadius="10" Margin="10">
<Border BorderThickness="1" BorderBrush="Black" Background="White"
Margin="0" CornerRadius="10">
<Grid>
<Border Height="40" Background="#01000000" VerticalAlignment="Top"
CornerRadius="10,10,0,0" MouseLeftButtonDown="DragWindow" />
<Rectangle x:Name="ResizeN" Fill="Yellow" VerticalAlignment="Top"
Height="4" Margin="9,-2,9,0" MouseEnter="DisplayResizeCursor"
MouseLeave="ResetCursor" PreviewMouseLeftButtonDown="Resize" />
<Rectangle x:Name="ResizeE" Fill="Yellow" HorizontalAlignment="Right"