Jonathan Neal shared this little snippet on Twitter: Execute JavaScript modules like: bash ./command.js 1. Add the funky header.2. Optional: Omit the extension to not write `.js`.3. Optional: `chmod +x command` to not write `bash `.https://t.co/rhlPg2XPRJ pic.twitter.com/nbAvTFtt0w — Jonathan Neal (@jon_neal) July 25, 2021 Here’s the code: “:” //#;exec /usr/bin/env node –input-type=module – “$@” < …
Category Archives: Original Content
Prevent unwanted Layout Shifts caused by Scrollbars with the scrollbar-gutter
CSS property
SSH: Skip Private Keys loaded into ssh-agent
Note to self: to SSH into a server with a username + password combination only — e.g. skipping any Private Key loaded into ssh-agent — use this command: ssh -o PreferredAuthentications=password user@server The connection will now ask for the user’s password, instead of trying to use public key authentication.
The Future of CSS: Scroll-Linked Animations with @scroll-timeline
(Part 3)
🚨 UPDATE: The Scroll-Linked Animations Specification and its proposed syntax have undergone a major rewrite. This post details an older version of the syntax and has not been updated to reflect these changes. Do note that the concept of a Scroll-Linked Animation still stands, it’s only the syntax that has changed since writing this. Please …
Continue reading “The Future of CSS: Scroll-Linked Animations with @scroll-timeline
(Part 3)“
The Large, Small, and Dynamic Viewports
Convert a String representation of a JavaScript Object to an Object
For my little helper tool that converts a JavaScript Style Object into Custom Properties I had to convert the contents of the textarea — which is a String — to an actual Object. Lacking a native Object.parse() — something like JSON.parse() or Array.from() but for objects — I created my own function: const createObjectFromString = …
Continue reading “Convert a String representation of a JavaScript Object to an Object”