other gists
🔗 TypeScript type toolbelt
🔗 TS/JS utility functions
note: Any ambient types referenced in the code samples below are defined in global.d.ts from the TypeScript type toolbelt.
other gists
🔗 TypeScript type toolbelt
🔗 TS/JS utility functions
note: Any ambient types referenced in the code samples below are defined in global.d.ts from the TypeScript type toolbelt.
other gists
🔗 TypeScript type toolbelt
🔗 React utils
note: Any ambient types referenced in the code samples below are defined in global.d.ts from the TypeScript type toolbelt.
This repository contains a collection of bookmarklets and script snippets that can be used to enhance the browsing experience.
Provides key binding to enable 2/5/10 sec rewind on Netflix and other sites.
scrollDown.js - Scroll down the page automatically
other gists
🔗 TS/JS utility functions
🔗 React utils
This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.
There are a couple of main reasons this is helpful:
See the Tailwind Plugins for more info on plugins.
by Jenny Knuth, based on the work of Chris Coyier and Taylor Hunt
A data URI is a nice way to include a web resource without needing to make an HTTP request. Chris Coyier explains the technique nicely in Probably Don't Base64 SVG.
While a PNG might use Base64 encoding, for SVG, there is a better way.
Taylor Hunt's experiments led to this solution for optimizing SVGs in data URIs:
"So the best way of encoding SVG in a data URI is data:image/svg+xml,[actual data]. We don’t need the ;charset=utf-8 parameter (or the invalid ;utf8 parameter…), because URLs are always ASCII."
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| ;============================== loading on startup =============================== | |
| ;= create a cmd link with the following target : | |
| ;= %comspec% /k "(doskey /macrofile=%userprofile%\doskey.mac)" | |
| ;============================= File listing enhancements ============================ | |
| alias_old=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /macros $g "%USERPROFILE%\doskey.mac" & ECHO Aliases SAVED) ELSE (IF /I "$1"=="LOAD" (doskey /macrofile="%USERPROFILE%\doskey.mac" & ECHO Aliases LOADED & doskey /macros) ELSE (doskey $*))) | |
| alias=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /macros $g "%USERPROFILE%\doskey.mac" & ECHO Aliases SAVED) ELSE (IF /I "$1"=="LOAD" (doskey /macrofile="%USERPROFILE%\doskey.mac" & ECHO Aliases LOADED & doskey /macros) ELSE (IF /I "$1"=="EDIT" (notepad %userprofile%\doskey.mac) ELSE (IF /I "$1"=="EDIT2" (notepad2 %userprofile%\doskey.mac) ELSE (doskey $*))))) | |
| alias_=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /mac |