Skip to content

Instantly share code, notes, and snippets.

View jessenich's full-sized avatar
😶‍🌫️
I may be slow to respond.

Jesse N. jessenich

😶‍🌫️
I may be slow to respond.
View GitHub Profile
@joonaszure
joonaszure / CreateAndValidateWithKeys.cs
Last active January 29, 2025 10:48
Using Azure Key Vault keys for signing and encrypting JSON Web Tokens
var vaultUri = new Uri("https://your-key-vault.vault.azure.net/");
var credential = new AzureCliCredential(new AzureCliCredentialOptions
{
TenantId = "your-aad-tenant-id"
});
var keyClient = new KeyClient(vaultUri, credential);
var cryptoProviderFactory = new CryptoProviderFactory();
cryptoProviderFactory.CustomCryptoProvider = new KeyVaultCryptoProvider(keyClient);
@jessenich
jessenich / .editorconfig
Last active April 25, 2023 16:02
Global EditorConfig
# .editorconfig help: https://EditorConfig.org
# References
# http://editorconfig.org/ (Official Site)
# http://editorconfig.org/#download (Plugins)
# http://davidensinger.com/2013/07/why-i-use-editorconfig/ (Reference)
# https://github.com/eslint/eslint/blob/master/.editorconfig (Sample file)
# No .editorconfig files above the root directory
root = true
@jessenich
jessenich / .gitattributes
Last active September 29, 2022 04:18
Git Attributes
# A primer on a few git attributes
# whitespace=space-before-tab = do not allow spaces followed by tabs
# whitespace=tab-in-indent = do not allow indentation by tabs
# whitespace=trailing-space = do not allow trailing spaces
# Attribute Column Starting Placements
# 1 pathspec / pattern / glob / regex / filename / etc. | Column: 1
# 2: [-][text] &| [-][binary] or [auto] | Column: 25
# 3: [eol=lf] &| [eol=crlf] or [eol=auto] or [eol=none] or [eol=unset] | Column: 50
# 4: [diff=text] or [diff=binary] or [diff=podiff] or [diff=html] or [diff=vs] or [-diffin] | Column: 85
@galvesribeiro
galvesribeiro / Custom Blazor Startup.html
Created April 11, 2020 18:50 — forked from SQL-MisterMagoo/Custom Blazor Startup.html
Custom Blazor Startup Example with custom Retries/Interval and custom Reconnection Handler (not production code)
<script autostart="false" src="_framework/blazor.server.js"></script>
<script>
async function connectionDown(options) {
console.log("Connection Down - you could do some UI here...");
for (let i = 0; i < options.maxRetries; i++) {
console.log("Waiting for reconnect attempt #"+(i+1)+" ...");
await this.delay(options.retryIntervalMilliseconds);
if (this.isDisposed) {
break;
}
@lakeman
lakeman / AutoMigration.cs
Last active October 9, 2023 00:30
Automatic database migration with EF Core 3.0
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design.Internal;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations.Design;
using Microsoft.EntityFrameworkCore.Migrations.Operations;
using Microsoft.EntityFrameworkCore.Storage;
@plembo
plembo / RPIwithQEMU.md
Last active July 5, 2025 11:09
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.

@kripken
kripken / hello_world.c
Last active March 19, 2025 06:14
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active May 26, 2025 06:38
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 29, 2025 18:40
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@yurydelendik
yurydelendik / !wasmllvm.md
Last active December 7, 2024 18:08
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR