Skip to content

Instantly share code, notes, and snippets.

View Sharuru's full-sized avatar

Sharuru Sharuru

  • Shanghai, China
View GitHub Profile
@noseratio
noseratio / remove-unwanted-windows11-apps.ps1
Last active October 21, 2024 01:16
Windows 11 autorun resident apps that I have to remove manually
# Teams 2.0 (no work account support yet)
winget uninstall MicrosoftTeams_8wekyb3d8bbwe
# Your Phone
winget uninstall Microsoft.YourPhone_8wekyb3d8bbwe
# Widgets (Web Experience Pack)
winget uninstall MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy
# Cortana
@jonkemp
jonkemp / validate-currency.js
Last active June 8, 2023 17:29
Currency validation method for the jQuery Validation plugin. Decimal place is optional but if included, it requires 2 places. Also, the dollar sign is optional.
// Validation method for US currency
$.validator.addMethod("currency", function (value, element) {
return this.optional(element) || /^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/.test(value);
}, "Please specify a valid amount");