Skip to content

Instantly share code, notes, and snippets.

View flytzen's full-sized avatar

Frans Lytzen flytzen

View GitHub Profile

Keybase proof

I hereby claim:

  • I am flytzen on github.
  • I am flytzen (https://keybase.io/flytzen) on keybase.
  • I have a public key whose fingerprint is F3B5 A5DA B581 6906 6153 334B BB01 F1C0 068C 6115

To claim this, I am signing this object:

@flytzen
flytzen / Public Private Key Encryption
Created October 7, 2014 22:52
Sample of using a self-signed X509 certificate to do public/private key encryption. **Use at your own risk **
namespace EncryptionWithCertificate
{
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
class Program
{
//// makecert -pe MyCryptCert.cer -ss my -n "CN=Frans" -sky exchange -r
@flytzen
flytzen / gist:446e86fe6c517f80dd80
Created December 2, 2014 15:40
Basic encryption with certificates
namespace EncryptionWithCertificate
{
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
class Program
{
//// makecert -pe MyCryptCert.cer -ss my -n "CN=Frans2" -sky exchange -r
namespace MissingProperty
{
using System;
using System.Linq;
using System.Security;
using System.Threading.Tasks;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
using System;
namespace MACPlay
{
class Program
{
static void Main(string[] args)
{
int id = 200;
DateTime expiry = DateTime.UtcNow.AddMinutes(15);
{"lastUpload":"2020-12-21T12:22:09.706Z","extensionVersion":"v3.4.3"}
@flytzen
flytzen / Markdown table writing
Last active September 7, 2021 12:40
Write markdown table from an array
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace ArrayPlay
{
class Program
{
@flytzen
flytzen / createLocustServer.sh
Created December 7, 2021 15:18
Create Locust Server - in progress
#!/bin/sh
# NOTE: On WSL, if you have not explicitly installed the az cli in the shell, it will use the one in windows.
# In that case, the ssh key will put into a windows directory and won't subseqentl be used when trying to ssh to the vm
group=fl-locust-test
location=northeurope
vmName=fl-locust-server
uid=locustuser
@flytzen
flytzen / Program.cs
Created December 22, 2023 10:51
Hash iteration tester
// First:
// dotnet add package BenchmarkDotNet
// Run like this:
// dotnet run -c Release
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;