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
| /** | |
| * Recursively searches the startObject for the given value. | |
| * | |
| * All matches are displayed in the browser console and stored in the global variable "gsResults" | |
| * The function tries to simplify DOM element names by using their ID, when possible. | |
| * | |
| * Usage samples: | |
| * | |
| * globalSearch( document, 'someValue' ); // Search entire DOM document for the string value. | |
| * globalSearch( document, '^start' ); // Simple regex search (function recognizes prefix/suffix patterns: "^..." or "...$"). |
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
| CHARACTERS = { | |
| ' ': [ | |
| [0, 0, 0], # Blank | |
| [0, 0, 0], | |
| [0, 0, 0], | |
| [0, 0, 0], | |
| [0, 0, 0] | |
| ], | |
| '0': [ | |
| [1, 1, 1], # 0 |
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
| ACTION=="add", KERNEL=="gpiochip[0-1]*", MODE="0666" | |
| ACTION=="add", KERNEL=="gpiomem", MODE="0666" |
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
| ACTION=="add", KERNEL=="spidev0.[0-1]*", MODE="0666" |
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
| [Unit] | |
| Description= | |
| After=network.target | |
| StartLimitIntervalSec=0 | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| RestartSec=1 | |
| User=ubuntu |
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 clearClass(className) { | |
| let elements = document.getElementsByClassName(className) | |
| for (let item of elements) { | |
| item.classList.remove(className) | |
| } | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="stylesheet" href=""> |
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
| # Adapted from https://stackoverflow.com/questions/1095543/get-name-of-calling-functions-module-in-python | |
| import inspect | |
| def get_calling_module_name(depth: int = 1) -> str: | |
| '''Check the module name of depth calls up the stack.''' | |
| stack = inspect.stack()[depth] | |
| caller = inspect.getmodule(stack[0]) | |
| return caller.__name__ |
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
| SUFFIXES = {1: 'st', 2: 'nd', 3: 'rd'} | |
| def get_ordinal(i): | |
| # Adapted from https://codereview.stackexchange.com/questions/41298/producing-ordinal-numbers | |
| if 10 <= i % 100 <= 20: | |
| return 'th' | |
| else: | |
| return SUFFIXES.get(i % 10, 'th') |
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
| #target photoshop | |
| /* | |
| Code for Import https://scriptui.joonas.me — (Triple click to select): | |
| {"activeId":33,"items":{"item-0":{"id":0,"type":"Dialog","parentId":false,"style":{"enabled":true,"varName":null,"windowType":"Dialog","creationProps":{"su1PanelCoordinates":false,"maximizeButton":false,"minimizeButton":false,"independent":false,"closeButton":true,"borderless":false,"resizeable":false},"text":"Lower Third Generator","preferredSize":[350,0],"margins":16,"orientation":"column","spacing":10,"alignChildren":["center","top"]}},"item-1":{"id":1,"type":"Panel","parentId":0,"style":{"enabled":true,"varName":"sourceText","creationProps":{"borderStyle":"etched","su1PanelCoordinates":false},"text":"Source Text","preferredSize":[350,0],"margins":10,"orientation":"column","spacing":10,"alignChildren":["left","top"],"alignment":null}},"item-2":{"id":2,"type":"StaticText","parentId":1,"style":{"enabled":true,"varName":"sourceTextHelp","creationProps":{"truncate":"none","multiline":false,"scrolling":false},"softWrap |
NewerOlder