Skip to content

Instantly share code, notes, and snippets.

View alexyorke's full-sized avatar

Alex Yorke alexyorke

View GitHub Profile
@alexyorke
alexyorke / npmjs-explore.user.js
Last active April 6, 2021 21:22 — forked from notpushkin/npmjs-explore.user.js
Redirect from npm's Explore link to https://unpkg.com/browse/*/, which is available for all ✨
// ==UserScript==
// @name npmjs.com Explore → unpkg.com Browse
// @author Alex Yorke (credits to Alexander Pushkov <alexander@notpushk.in>)
// @version 2
// @grant none
// @include https://npmjs.com/package/*
// @include https://www.npmjs.com/package/*
// ==/UserScript==
const oldExploreLink = document.querySelector('a[href="?activeTab=explore"]');
@alexyorke
alexyorke / add_node_vs_code_studio_exceptions.ps1
Last active January 29, 2020 18:37 — forked from darvell/add_node_exceptions.ps1
Adds useful exceptions to Windows Defender for node.js developers. MUST BE RUN as an administrator
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
Break
}
Write-Host "Excluding appdata NPM folder and Node.JS install folder from Windows Defender."
Add-MpPreference -ExclusionPath ([System.Environment]::ExpandEnvironmentVariables("%APPDATA%\npm\"))
Add-MpPreference -ExclusionPath (Get-ItemProperty "HKLM:SOFTWARE\Node.js" | Select-Object -Property InstallPath)