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
function Set-ScreenRefreshRate | |
{ | |
param ( | |
[Parameter(Mandatory=$true)] | |
[int] $Frequency | |
) | |
$pinvokeCode = @" | |
using System; | |
using System.Runtime.InteropServices; |
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
Show hidden characters
{ | |
"name": ".NET 8.0", | |
"image": "mcr.microsoft.com/dotnet/sdk:8.0", | |
"features": { | |
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | |
"ghcr.io/devcontainers/features/github-cli:1": { | |
"version": "2" | |
}, | |
"ghcr.io/devcontainers/features/powershell:1": { | |
"version": "latest" |
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
using System.ComponentModel.DataAnnotations; | |
namespace BlazorContactForm.Shared | |
{ | |
public class ContactFormModel | |
{ | |
[Required(ErrorMessage = "Please enter your name.")] | |
public string Name { get; set; } | |
[Required(ErrorMessage = "Please enter your email address.")] |
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
{ | |
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04", | |
"settings": { | |
"[typescript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true |
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
using Newtonsoft.Json.Linq; | |
using RestSharp; | |
const string tenant = "dev-n1b7bzid.us"; | |
const string clientId = "wnvXuZ1rD5VeT4NGBzr1MDNLWu43H5KA"; | |
string access_token = string.Empty; | |
var client = new RestClient($"https://{tenant}.auth0.com/oauth/device/code"); | |
var request = new RestRequest(); | |
request.Method = Method.Post; |
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
@code { | |
@inject IJSRuntime JSRuntime | |
protected override async Task OnInitializedAsync() | |
{ | |
await JSRuntime.InvokeVoidAsync("console.log", "%cRed Origin 5.0.1 🚀", "color:#0dd8d8; background:#0b1021; font-size:1.5rem; padding:0.15rem 0.25rem; margin: 1rem auto; font-family: Rockwell; border: 2px solid #0dd8d8; border-radius: 4px;font-weight: bold; text-shadow: 1px 1px 1px #00af87bf;"); | |
} | |
} |
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
$branches = ("master", "main", "develop", "dev") | |
# get all directories in the current directory (just the first level) | |
$repos = Get-ChildItem -Path . -Filter .git -Recurse -Depth 1 -Force -Directory | Select-Object -expandproperty fullname | |
function Update-Repos { | |
Push-Location ".." | |
$branch = &git rev-parse --abbrev-ref HEAD |
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
using Microsoft.AspNetCore.Authentication.JwtBearer; | |
using Microsoft.OpenApi.Models; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddEndpointsApiExplorer(); | |
builder.Services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", new OpenApiInfo | |
{ |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": | |
{ | |
"action": "copy", | |
"singleLine": false | |
}, |
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
##################### | |
# SOFTWARE | |
##################### | |
# Console | |
cinst poshgit | |
# 7Zip | |
cinst 7zip.install -y |
NewerOlder