Skip to content

Instantly share code, notes, and snippets.

@plugn
plugn / settings.json
Created November 17, 2026 15:34
VSCode bypass memory wasting - place into root `.vscode/` folder
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/tmp/**": true,
"**/log/**": true,
"**/public/packs/**": true,
"**/public/assets/**": true,
"/bundle/**": true
@plugn
plugn / keybindings.json
Created November 11, 2026 07:47
VSCode Keymap (Keybindings, Shortcuts)
[
{
"key": "alt+left",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "alt+right",
"command": "cursorEnd",
"when": "editorTextFocus"
@plugn
plugn / javascript.json
Created October 11, 2026 00:37
VSCode JS logger ` * $FUNCTION() WHAT: $WHAT` (must place cursor on a line with function name)
{
"Log Function Name": {
"prefix": "flog",
"body": [
"\n\tconsole.log(' * ${TM_CURRENT_LINE/.*(?:function|const|let|async)\\s+([a-zA-Z0-9_]+).*/$1/}() $1: ', $1);"
]
}
}
@plugn
plugn / GTakeoutDateFixer.sh
Last active September 14, 2026 16:06
Google Takeout Date Fixer v5.8 (Full Progress UI)
#!/bin/bash
# Google Takeout Date Fixer v6.1 (Simple Suffix Config + Forward Search)
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
@plugn
plugn / throttle-debounce.js
Created June 4, 2026 21:14
throttle & debounce from scratch
function throttle(fn, delay) {
let startTime = 0
return function (...args) {
const now = Date.now()
// if not in progress
if (startTime === 0) {
startTime = now
}
body {
min-height: 100vh;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
div {
width: 105px;
@plugn
plugn / dwbGuy.svg
Created October 24, 2025 15:58
dwbGuy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@plugn
plugn / nginx_macos.md
Created April 4, 2025 08:54 — forked from osamaqarem/nginx_macos.md
Nginx on MacOS

Install nginx (Homebrew)

brew install nginx

Configuration file for nginx will be at /usr/local/etc/nginx/nginx.conf

Web apps can be stored at /usr/local/var/www

Commands

Start:

@plugn
plugn / get-event-listeners.js
Created November 28, 2024 15:53 — forked from cmckni3/get-event-listeners.js
Get all event listeners on page
window.getAllEventListeners = () => {
return Array.from(document.querySelectorAll('*')).map(element => {
const listeners = getEventListeners(element);
return {
element: element,
listeners: Object.keys(listeners).map(key => {
return {
event: key,
@plugn
plugn / index.html
Last active November 14, 2024 09:58
JointJS+: PDF Export
<div id="app">
<div id="paper-container"></div>
</div>
<div id="toolbar-container"></div>
<a target="_blank" href="https://www.jointjs.com">
<img id="logo" src="https://assets.codepen.io/7589991/jointjs-logo.svg" width="200" height="50"></img>
</a>