This file contains hidden or 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
final EzSchema userProfileSchema = EzSchema.shape({ | |
"firstName": EzValidator<String>().required(), | |
"lastName": EzValidator<String>().required(), | |
"email": EzValidator<String>().required().email(), | |
"age": EzValidator<int>().min(18).max(100), | |
'contactDetails': EzSchema.shape({ | |
'mobile': EzValidator<String>() | |
.required() | |
.matches(RegExp(r'^\+\d{10,15}$'), 'Invalid phone number'), | |
'landline': EzValidator<String?>(optional: true), |
This file contains hidden or 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
Function Convert-Image | |
{ | |
Param ( | |
[Parameter(Mandatory = $true)] | |
[string]$Name, | |
[Parameter(Mandatory = $true)] | |
[string]$Tag, | |
[Parameter(Mandatory = $false)] |
This file contains hidden or 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
using System.Net; | |
using System.Text; | |
var port = 8080; | |
var server = new Server(port); | |
server.UseAuthentication(); | |
server.UseRouting(); | |
server.UseNotFoundPage(); |
Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'
This file contains hidden or 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
alias getsecret="_getsecret" | |
# ~/.secrets/secrets.json !!! chmod 400 | |
# { | |
# "group1": { | |
# "secret1":"value", | |
# "secret2":"value" | |
# }, |
This file contains hidden or 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
#Finder - Full Path in the Title | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES|NO | |
#Finder - Show All Files | |
defaults write com.apple.finder AllShowAllFiles TRUE|FALSE | |
#Finder - Add Quit to Menu | |
defaults write com.apple.finder QuitMenuItem -bool TRUE|FALSE && killall Finder | |
#Dialogs Print - Show the Extended Print Dialog by default |
- Damian Edward's Minimal Playground: https://github.com/DamianEdwards/MinimalApiPlayground
- Contoso Construction API with Azure Deployment Scripts: https://github.com/bradygaster/Contoso.Construction
- .NET Conf 2021 Demo App: https://github.com/halter73/Contoso.Construction
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This file contains hidden or 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
# -*- mode: sh; sh-shell: bash; -*- | |
# shellcheck shell=bash | |
# MIT license (c) 2021 https://github.com/slowpeek | |
# Homepage: https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152 | |
############################################################## | |
############################################################## | |
## THIS GIST IS OBSOLETE AND IS NO LONGER UPDATED. | |
## Use here-bye instead: https://github.com/slowpeek/here-bye |
NewerOlder