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
| self.DEBUG_ON = true; | |
| function DEBUG(...args) { | |
| if (!DEBUG_ON) { return; } | |
| const stack = (new Error().stack).match(/\s+at .*\s+at ([^\(]+)/); | |
| const caller = stack && stack[1] ? stack[1].replace(/\s+$/, '') : 'top_level'; | |
| (console.debug || console.log)(`[DEBUG@(${caller})]:`, ...args); | |
| } | |
| Object.defineProperty(Object.prototype, 'DEBUG', { | |
| value: function DEBUG_PIPE(msg, ...args) { | |
| DEBUG(msg, this, ...args); |
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
| #!/bin/bash | |
| # Generate JavaScript dependency graph with Madge and open in default SVG viewer | |
| function random_filename() { | |
| local length=${1:-10} | |
| head -c $(( $length * 100 )) /dev/urandom | \ | |
| tr -dc 'a-zA-Z0-9-_' | \ | |
| head -c $length | |
| } |
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
| #!/bin/bash | |
| ################################################################################ | |
| # | |
| # Replace marked variables with environment variables (in-place version). | |
| # Author: lleaff | |
| # Version: 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
| /* | |
| * VS Code - Smaller Activity bar, larger sidebar (left side only) | |
| * | |
| * To enable: | |
| * - Install https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css | |
| * - Save content of this file somewhere, CUSTOMCSSPATH. | |
| * - Add to VS Code user settings: | |
| * "vscode_custom_css.imports": ["file://CUSTOMCSSPATH"], | |
| * "vscode_custom_css.policy": true, | |
| * - $ sudo -E code --user-data-dir=$HOME/.config/Code/ |
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 node | |
| // Copy styles from one ASS subtitle file to another by copying every section above [Events] | |
| const fs = require('fs').promises | |
| const sourcePath = process.argv[2] | |
| const targetPath = process.argv[3] | |
| async function main() { |
OlderNewer