Skip to content

Instantly share code, notes, and snippets.

@hallojoe
hallojoe / indsigtsret.md
Last active August 10, 2024 19:40
Skabelon til forespørgelse om indsigt i persondata

Emne: Anmodning om indsigt i personoplysninger i henhold til GDPR

Kære [Virksomhedens navn],

Jeg skriver for at anmode om indsigt i de personoplysninger, som jeres virksomhed måtte have om mig i overensstemmelse med artikel 15 i General Data Protection Regulation (GDPR).

I henhold til artikel 15 i GDPR har jeg som registreret person ret til at få bekræftet, om der behandles personoplysninger om mig, og i bekræftende fald adgang til følgende oplysninger:

  • De personoplysninger, som behandles om mig.
  • Formålene med behandlingen.
public static class UriStringExtensions
{
public static Uri? ToUri(this string? uriString, UriKind uriKind = UriKind.RelativeOrAbsolute)
{
if (string.IsNullOrWhiteSpace(uriString)) return null;
return Uri.TryCreate(uriString, uriKind, out var uri) ? uri : null;
}
public static IEnumerable<Uri> ToUriCollection(this string? uriCollectionString, char separator = ',', UriKind uriKind = UriKind.RelativeOrAbsolute)
[#*0-9]\uFE0F?\u20E3|©\uFE0F?|[®\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA]\uFE0F?|[\u231A\u231B]|[\u2328\u23CF]\uFE0F?|[\u23E9-\u23EC]|[\u23ED-\u23EF]\uFE0F?|\u23F0|[\u23F1\u23F2]\uFE0F?|\u23F3|[\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC]\uFE0F?|[\u25FD\u25FE]|[\u2600-\u2604\u260E\u2611]\uFE0F?|[\u2614\u2615]|\u2618\uFE0F?|\u261D(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642]\uFE0F?|[\u2648-\u2653]|[\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E]\uFE0F?|\u267F|\u2692\uFE0F?|\u2693|[\u2694-\u2697\u2699\u269B\u269C\u26A0]\uFE0F?|\u26A1|\u26A7\uFE0F?|[\u26AA\u26AB]|[\u26B0\u26B1]\uFE0F?|[\u26BD\u26BE\u26C4\u26C5]|\u26C8\uFE0F?|\u26CE|[\u26CF\u26D1\u26D3]\uFE0F?|\u26D4|\u26E9\uFE0F?|\u26EA|[\u26F0\u26F1]\uFE0F?|[\u26F2\u26F3]|\u26F4\uFE0F?|\u26F5|[\u26F7\u26F8]\uFE0F?|\u26F9(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF](?:\u200D[\u2640\u2642]\uFE0F?)?|\uFE0F(?:\u200D[\u2640\u2642]\uFE0F?)?)?|[\u26FA\u26FD]|\u2702\uFE0F?|\u2705|[\
@hallojoe
hallojoe / osi.md
Created November 10, 2023 09:54
Description of the 7 OSI layers.

OSI Layers

The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. Each layer in the OSI model serves a specific purpose and communicates with the adjacent layers. Here's a brief description of each layer from the bottom (Layer 1) to the top (Layer 7):

Physical Layer (L1):

  • Function: Deals with the physical connection between devices.
  • Activities: Transmission and reception of raw bit streams over a physical medium, such as cables or wireless signals.
  • Devices: Hubs, cables, repeaters.

Data Link Layer(L2):

@hallojoe
hallojoe / certificate-formats.md
Last active August 28, 2023 06:50
Certificate formats

Certificate formats

Certificate formats are used to store digital certificates, which are cryptographic files that contain information about an entity (such as a website or an individual) and their corresponding public key. These certificates are used in various security protocols like SSL/TLS to establish secure connections and verify the authenticity of the parties involved. Different formats are used to store certificates and their associated private keys, and they vary in terms of their structure and supported encryption algorithms. Let's go through some of the common certificate formats:

These formats serve different purposes based on whether you need to store certificates, private keys, or other related cryptographic data, and whether you prioritize human-readability or compactness. The choice of format often depends on the system or application you are working with.

PEM (Privacy-Enhanced Mail) .pem, .crt, .cer

PEM is a widely used format that can contain both certificates and private key

@hallojoe
hallojoe / switch.scss
Last active March 16, 2022 19:10
Styles for role=switch
input[role=switch],
input[role=switch] {
// public
// apperance
--size: 1.5;
--round: 1;
--spacing: .125em;
--transition: .15s ease-in;
@hallojoe
hallojoe / isometric-ratio.md
Created February 19, 2022 20:43
Isometric Ratio

Isometric Ratio

1.4142:1 1:0.5773

@hallojoe
hallojoe / status.md
Created February 7, 2022 15:08
REST client is a bitch and Azure pipelines is a man-whore without access to viagra.

Status

The REST client is a bitch and Azure pipelines is a man-whore without access to viagra.

@hallojoe
hallojoe / FluentBuilder.ts
Last active January 29, 2022 05:34
Fluent builder pattern in TypeScript
interface IBuilder<T> {
build(): T
}
interface IValueModel {
name: string
date: Date
}
class FluentValueModelBuilder implements IBuilder<IValueModel> {
@hallojoe
hallojoe / bitwise.md
Last active November 4, 2021 13:03
Bitwise in 1010 seconds.

Bitwise

Bitwise in 1010 seconds.

AND &

Return 1 where both are 1:

   bin   dec