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
| /** TEXT FITTER | |
| * | |
| * A script that automatically matches an element's text | |
| * to perfectly fill the inline width of its containing element. | |
| * | |
| * (At least, perfectly to the glyph level. If a glyph has a lot | |
| * of leading or trailing space, that space will still be respected) | |
| * | |
| * Presented as-is under The Unlicense, see below for license info. | |
| */ |
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
| /** DECAP CHAR WIDGET | |
| * | |
| * A custom Decap widget like "string", that only allows a single character | |
| * | |
| * INSTALLATION | |
| * | |
| * 1.) Drop/load this script the directory with Decap's index.html, and add: | |
| <script src="decapServerWarning.js"></script> |
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
| // @ts-check | |
| // gist: https://gist.github.com/nickyonge/1988b42e7a30b5019c47125a0009bd81 | |
| // current major issue is that color replcaement doesn't work, see RecolorImage func | |
| import { | |
| clampGamut, | |
| converter, | |
| differenceCiede2000 |
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
| /** DECAP COLLECTION SUMMARY COLOR DISPLAY | |
| * | |
| * Replaces a color string in your Decap CMS Collection's title text | |
| * with a visual indicator of that color, including a color swatch, | |
| * text output, and/or updating the collection item's background color. | |
| * | |
| * | |
| * MARK: Setup | |
| * Using marks for VSCode minimap navigation | |
| * |
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
| /** DECAP SERVER CONNECTION WARNING DETECTOR | |
| * | |
| * Autodetects when Decap CMS fails to connect, | |
| * and reminds you to run npx decap-server, | |
| * because we could all use a little reminder sometimes | |
| * | |
| * More errors can be added to listen for, but it will only | |
| * trigger on the first error recognized. Sometime I should | |
| * generalize this~ | |
| * |
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
| \bMARK:\s*(?<separator>-?)\s*(?<label>.*?)(?:\s*(?:(?:[*]\/)|(?:-{2,}>)|(?:#>)|$)) | |
| More details: https://www.reddit.com/r/vscode/comments/1p4f3jt/i_made_better_mark_regex_for_section_headers_in/ |
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
| // NOTE: this is an outdated version of the Webpack template. | |
| // Preserving this as a separate gist, in addition to the original's changelogs. | |
| // See https://gist.github.com/nickyonge/bb9fe46458c16e1cd560bce505e4af39 for the new version. | |
| /* WEBPACK TEMPLATE SETUP | |
| * webpack.config.js | |
| * | |
| * All the steps for getting a new webpack-based website started via VS Code! | |
| * | |
| * This script itself is a file called webpack.config.js and is used to tell Webpack how to build your site. |
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
| // Warnings to ensure ATtinyX4's Arduino pinmapping is defined correctly | |
| #ifdef __AVR_ATtinyX4__ // ensure ATtinyX4 platform, proceed with warning checks | |
| // SETUP: Uncomment ONE of the two definitions below to select the desired pinmapping: | |
| #define USE_CW_PINMAPPING // this project uses CLOCKWISE (CW) pinmapping | |
| // #define USE_CCW_PINMAPPING // this project uses COUNTERCLOCKWISE (CCW) pinmapping | |
| #ifdef USE_CW_PINMAPPING | |
| #ifdef USE_CCW_PINMAPPING | |
| #error "Both CW and CCW pinmappings are specified - only one may be selected!" |
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
| /* PINOUT DIAGRAMS FOR ATTINYX4 / ATTINYX5 | |
| ATtinyX4 | |
| .--------. | |
| VCC [2.7-5.5V] - 1 =| O |= 14 - GND | |
| 10(0),X1,PCI8,PB0 - 2 =| |= 13 - 0(10),A0,PCI0,PA0 | |
| 9(1),X2,PCI9,PB1 - 3 =| |= 12 - 1(9),A1,TXD,PCI1,PA1 | |
| RESET,11(11),PCI11,PB3 - 4 =| |= 11 - 2(8),A2,RXD,PCI2,PA2 | |
| 8(2),INT0,PCI10,PB2 - 5 <| |= 10 - 3(7),A3,PCI3,PA3 | |
| 7(3),A7,PCI7,PA7 - 6 <| |= 9 - 4(6),A4,SCK/SCL,PCI4,PA4 |
NewerOlder