- Bootstrap a local smallstep CA following the guide. Remember to start your CA server.
- Issue certificates:
- Download Root ca:
step ca root ca.crt
- Issue server cert:
step ca certificate "mtls.internal" server.crt server.key
- Issue client cert:
step ca certificate "mtls.internal" client.crt client.key
- Download Root ca:
- Start the server at the same directory or modify the code to locate the cert files. If you issued the certs like my setup, remember to add the domain
mtls.internal
in yourhosts
or so on. - Test with
TestClient
or test with curl:curl -vvvv https://mtls.internal:8080 --cacert ca.crt --cert client.crt --key client.key
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydantic import BaseModel, Field, RootModel, Discriminator, Tag | |
from typing import Literal, TypeVar, Generic, Annotated, Any | |
_ResponseType = TypeVar("_ResponseType") | |
def get_discriminator_value(v: Any) -> str: | |
if isinstance(v, dict): | |
return "success" if v.get("code") == 0 else "error" | |
return "success" if getattr(v, "code") == 0 else "error" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import walk | |
from urllib.parse import urlparse | |
from playwright.sync_api import sync_playwright | |
from time import sleep | |
TEMPLATE = "https://drive.usercontent.google.com/download?id={share_id}&export=download" | |
if __name__ == "__main__": | |
with sync_playwright() as p: |
$argon2id$v=19$m=512,t=256,p=1$n6yvzJe2AxOS6yQBsCPKKA$Ei089XHiQ+u6SDk9DmyzLOzr7qccHmzJ88uK3eKg2dQ
- Designing a Modern GPU Interface by @BrookeHodgman
- Optimizing the Graphics Pipeline with Compute by @gwihlidal
- GPU Driven Rendering Pipelines by @SebAaltonen
- Destiny’s Multi-threaded Renderer Architecture by @Mirror2Mask
- Stingray Renderer Walkthrough by @tobias_persson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC | |
from copy import deepcopy | |
from dataclasses import dataclass, fields | |
from datetime import datetime | |
from enum import Enum | |
from typing import Union, get_args, get_origin | |
from uuid import UUID | |
nt = type(None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package http | |
import ( | |
"bytes" | |
"context" | |
"encoding/json" | |
"io" | |
"net/http" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You need at least `nom = "7"` to work. | |
mod protocol { | |
use std::{fmt, str::FromStr}; | |
use nom::Finish; | |
use self::parser::parse; | |
const DELIMITER: &str = "\r\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "playground" | |
version = "0.1.0" | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tokio = { version = "1.9", features = ["full"] } | |
thiserror = "1.0" |
NewerOlder