Skip to content

Instantly share code, notes, and snippets.

@mhrastegari
mhrastegari / BlazorLongPressSample.razor
Last active December 12, 2024 22:13
Long press sample for Blazor
<div style="
width: 150px;
height: 150px;
display: grid;
align-content: center;
justify-content: center;
border: 2px solid dodgerblue;"
@onpointerdown="PointerDown"
@onpointerup="PointerUp">
@Text
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active May 1, 2025 18:05
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@HonbraDev
HonbraDev / remove.sh
Last active January 11, 2025 06:31
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
#pragma warning disable MA0048 // File name must match type name
#define INTERNAL_NULLABLE_ATTRIBUTES
#if NETSTANDARD2_0 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NET45 || NET451 || NET452 || NET46 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48
// https://github.com/dotnet/corefx/blob/48363ac826ccf66fbe31a5dcb1dc2aab9a7dd768/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
@bityob
bityob / Enable-OpenSSH-Client-Server-On-Windows.md
Last active March 11, 2025 22:23
Enable SSH Client/Server with OpenSSH on Windows

How to enable ssh on Windows?

Tested on Windows Version 10.0.17755.1

  • Run cmd as admin

  • Install OpenSSH.Client - dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

C:\WINDOWS\system32&gt;dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0
@tygor
tygor / Deploy-SquirrelApp.ps1
Last active June 10, 2020 22:19
Squirrel.Windows Powershell Releasify script
<#
.Synopsis
Packs and deploys a Squirrel.Windows app
.DESCRIPTION
Nuget Pack and Squirrel.Windows Releasify. The parameters taken will then run the --signWithParams flag which signs your executables with the given certificate.
.EXAMPLE
Deploy-SquirrelApp -NuSpec C:\Temp\MyApp.nuspec -OutputDir .\bin\Release\ -ReleaseDir C:\Network\Folder\ -CertificatePath .\Certificate.pfx
#>
function Deploy-SquirrelApp {
[CmdletBinding()]
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 17, 2025 19:11
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@dknoodle
dknoodle / Windows Defender Exclusions VS 2017.ps1
Last active February 27, 2025 07:27
Adds Windows Defender exclusions for Visual Studio 2017
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@thomaslevesque
thomaslevesque / CSharpErrorsAndWarnings.md
Last active November 27, 2024 07:55
All C# errors and warnings. NOTE: this list is out of date. See https://github.com/thomaslevesque/GenerateCSharpErrors/blob/master/CSharpErrorsAndWarnings.md for a more recent version

All C# errors and warnings

Parsed from the Roslyn source code using Roslyn.

Code Severity Message
CS0006 Error Metadata file '{0}' could not be found
CS0009 Fatal Metadata file '{0}' could not be opened -- {1}
CS0012 Error The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'.
CS0016 Error Could not write to output file '{0}' -- '{1}'
@crshnbrn66
crshnbrn66 / user-profile.psm1
Last active February 17, 2025 20:31 — forked from MSAdministrator/Create-NewProfile.ps1
PowerShell functions to create a new user profile
<#
.Synopsis
Rough PS functions to create new user profiles
.DESCRIPTION
Call the Create-NewProfile function directly to create a new profile
.EXAMPLE
Create-NewProfile -Username 'testUser1' -Password 'testUser1'
.NOTES
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif)