Skip to content

Instantly share code, notes, and snippets.

View foontzoot's full-sized avatar
🏠
Working from home

foontzoot foontzoot

🏠
Working from home
View GitHub Profile
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@foontzoot
foontzoot / BestPracticesDotNet.md
Last active August 27, 2023 22:33
best practices to improve .NET

.NET Best Practices

Use profiling tools

Example: Using Stopwatch to measure method performance

using System;
using System.Diagnostics;
name: publish Ardalis.Extensions to nuget
on:
workflow_dispatch:
push:
branches:
- main # Your default release branch
paths:
- 'src/Ardalis.Extensions/**'
jobs:
publish:
@foontzoot
foontzoot / serverless.template
Created June 14, 2023 13:25
template for .NET 6 Lambda serverless application running on ARM64 processors
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "An AWS Serverless Application.",
"Resources": {
"Get": {
"Type": "AWS::Serverless::Function",
"Properties": {
"Handler": "LambdaServerlessApplicationOnArm64::LambdaServerlessApplicationOnArm64.Functions::Get",
"Architectures": ["arm64"],
@foontzoot
foontzoot / aws-lambda-tools-defaults.json
Created June 14, 2023 13:22
Lambda function on arm64
{
"Information": [
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.",
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.",
"dotnet lambda help",
"All the command line options for the Lambda command can be specified in this file."
],
"profile": "",
"region": "",
"configuration": "Release",

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@foontzoot
foontzoot / block-razer-synapse.ps1
Last active January 25, 2023 20:56
Block Razer Synapse
$RazerSynapsePath = "C:\Windows\Installer\RazerSynapse"
# Disable driver auto-install via registry
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Installer" -Name "DisableCoInstallers" -Type DWord -Value 1
# Remove and lock install directory
Remove-Item $RazerSynapsePath -Recurse -Force
New-Item -Path "C:\Windows\Installer\" -Name "RazerSynapse" -ItemType "directory"
$Acl = Get-Acl $RazerSynapsePath
@foontzoot
foontzoot / block.ps1
Created January 25, 2023 20:38
Block Razer bloatware
# Code from https://github.com/ChrisTitusTech/block-razer
$RazerPath = "C:\Windows\Installer\Razer"
# Disable driver auto-install via registry
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Installer" -Name "DisableCoInstallers" -Type DWord -Value 1
# Remove and lock install directory
Remove-Item $RazerPath -Recurse -Force
New-Item -Path "C:\Windows\Installer\" -Name "Razer" -ItemType "directory"
sudo chgrp plex /media/<name>/NAS01/Plex
sudo chmod g+rX /media/<name>/NAS01/Plex
sudo chgrp plex /media/<name>/NAS01/Plex
sudo chmod g+rX /media/<name>/NAS01/Plex
sudo setfacl -m g:plex:rx /media/<name>/
sudo chmod -R g+rX /media/<name>/NAS01/Plex/
# Version: 1.5.0 (Using https://semver.org/)
# Updated: 2020-07-24
# See http://EditorConfig.org for more information about .editorconfig files.
##########################################
# Common Settings
##########################################
# This file is the top-most EditorConfig file
root = true