This explains and demos how to use diagrams.net (draw.io) diagrams in your GitHub repo.
- See repo for more details
- Diagrams are stored in your repository with your code and docs
- Diagram access is controlled by GitHub repository access
//Snippet from Program.cs which adds the provider and sets up a Settings class to map the settings | |
using ErikNoren.Configuration; | |
using TestMvcWebApplication; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Configuration.AddSqlDatabase(config => | |
{ | |
//We can get the connection string from previously added ConfigurationProviders to use in setting this up | |
config.ConnectionString = builder.Configuration.GetConnectionString("DemoDatabase"); |
This explains and demos how to use diagrams.net (draw.io) diagrams in your GitHub repo.
<# | |
.SYNOPSIS | |
Create an OpenSSH compatible Public and Private Key in pure Powershell | |
.DESCRIPTION | |
Many scripts rely on the openssh or openssl tools to be available to generate public and private keys compatible with OpenSSH, but this script relies purely on Powershell (and some .NET classes already included) to generate public and private keys. | |
.EXAMPLE | |
PS /git/scripts> ./Create-OpenSSHPubAndPrivateKeys.ps1 -PublicKeyPath my-key.pub -PrivateKeyPath my-key | |
.LINK | |
mailto:grog@grogscave.net | |
#> |
/* | |
Simple OpenSCAD DIN rail clip. | |
*/ | |
module clip(z = 6) { | |
a = 7; | |
b = 1.2; // metal sheet thickness, should be ~ 1 | |
c = 2.5; |
{ | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": true, | |
"experimental_showTabsInTitlebar": true, | |
"requestedTheme": "dark", | |
"profiles": [ | |
{ |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
namespace DamienBraillard.AspNetCoreSimpleRoleAuthorization | |
{ | |
/// <summary> | |
/// Defines the base functionality of the class used to provide applicative roles for a user when using the simple role | |
/// authorization. | |
/// </summary> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program { | |
public static void Main() { | |
// Test data | |
byte[] prefix = { 0xDE, 0xAD, 0xBE, 0xEF }; // 4 bytes | |
byte[] block1 = { 0xAA, 0xAA, 0xAA, 0xAA }; // 4 bytes | |
byte[] block2 = { 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, }; // 8 bytes |
translate([0,0,0]) sector(30, 20, 10, 90); | |
translate([22,0,0]) sector(30, 20, 300, 30); | |
translate([0,22,0]) sector(30, 20, 30, 300); | |
translate([22,22,0]) sector(30, 20, 10, 190); | |
module sector(h, d, a1, a2) { | |
if (a2 - a1 > 180) { | |
difference() { | |
cylinder(h=h, d=d); | |
translate([0,0,-0.5]) sector(h+1, d+1, a2-360, a1); |
/// ================ Half.cs ==================== | |
/// The code is free to use for any reason without any restrictions. | |
/// Ladislav Lang (2009), Joannes Vermorel (2017) | |
using System; | |
using System.Diagnostics; | |
using System.Globalization; | |
namespace SystemHalf | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Build.Evaluation; | |
using Microsoft.Build.Construction; | |
namespace SourceCombiner |