Skip to content

Instantly share code, notes, and snippets.

View duurland's full-sized avatar

durland duurland

View GitHub Profile
@RichardMarks
RichardMarks / Controller.js
Created March 11, 2020 23:28
Versatile JS Controller/Plugin System
const Controller = () => {
const controller = {
__VERSION__: '1.0.0',
plugins: {},
installPlugin (plugin, override) {
if (!plugin || !('__pluginName__' in plugin)) {
throw new Error(`Controller was unable to install plugin - Invalid plugin was provided.`)
}
@noseratio
noseratio / purge-node-modules.cmd
Last active January 24, 2025 00:45
Delete node_modules recursively on Windows
@echo off
set folders=node_modules
echo This will delete all [%folders%] folders recursively and cannot be undone.
choice /t 10 /d n /c yn /m "Press Y to continue, N to stop"
if %errorLevel% neq 1 goto :EOF
for /d /r . %%D in (%folders%) do if exist "%%~fD\" (echo %%D && rd "%%~fD" /s /q)