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
| #!/usr/bin/env python3 | |
| """Grab a single JPEG frame from an MJPEG stream.""" | |
| import argparse | |
| import re | |
| import sys | |
| import urllib.request | |
| from pathlib import Path | |
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
| // Attach the event listener to a common ancestor (e.g., the document) | |
| document.addEventListener('keydown', function (event) { | |
| const textField = event.target; | |
| if (textField.matches('input[type="text"], textarea')) { | |
| // Check if Alt key is held | |
| if (event.altKey) { | |
| // Check if Shift key is also held | |
| const step = event.shiftKey ? 10 : 1; | |
| // Get the current value from the input field |
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
| // Pass in list of properties to transition | |
| // | |
| // .foo{ | |
| // @include transitioner(background-color,color); | |
| // } | |
| @mixin transitioner($prop...){ | |
| $animations: ""; | |
| $params: length($prop); | |
| $loopcount: 0; |