| Action | Shortcut |
|---|---|
| Scroll line up | ctrl+shift+up (also ⌥+⌘+⇞ and ⌘+↑ on macOS) |
| Scroll line down | ctrl+shift+down (also ⌥+⌘+⇟ and ⌘+↓ on macOS) |
| Scroll page up | ctrl+shift+page_up (also ⌘+⇞ on macOS) |
| Scroll page down | ctrl+shift+page_down (also ⌘+⇟ on macOS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Update globs depending on your framework | |
| --- | |
| name: tailwind_v4 | |
| description: Guide for using Tailwind CSS v4 instead of v3.x | |
| globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"] | |
| tags: | |
| - tailwind | |
| - css | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: (function() { | |
| var root = $(document.getElementsByTagName('html')); | |
| var watchers = []; | |
| var attributes = []; | |
| var attributes_with_values = []; | |
| var elements = []; | |
| var elements_per_attr = []; | |
| var scopes = []; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //==== Simple SCSS mixin to create CSS triangles | |
| //==== Example: @include css-triangle ("up", 10px, #fff); | |
| @mixin css-triangle ($direction: "down", $size: 20px, $color: #000) { | |
| width: 0; | |
| height: 0; | |
| border-left: $size solid #{setTriangleColor($direction, "left", $color)}; | |
| border-right: $size solid #{setTriangleColor($direction, "right", $color)}; | |
| border-bottom: $size solid #{setTriangleColor($direction, "bottom", $color)}; | |
| border-top: $size solid #{setTriangleColor($direction, "top", $color)}; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To remove a submodule you need to: | |
| Delete the relevant line from the .gitmodules file. | |
| Delete the relevant section from .git/config. | |
| Run git rm --cached path_to_submodule (no trailing slash). | |
| Commit and delete the now untracked submodule files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
NewerOlder