This file contains 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
// | |
// Settings | |
// | |
const MAX_TASKS_SHOWN = 5; | |
const NOW = new Date(); | |
const BG_COLOR = Color.black(); | |
const TITLE_COLOR = Color.white(); | |
const TITLE_FONT = Font.systemFont(20); | |
const OVERDUE_COLOR = new Color("#f73c82"); |
This file contains 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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: teal; icon-glyph: magic; | |
// | |
// Settings | |
// | |
const LOOK_BEHIND_HOURS = 1; | |
const LOOK_AHEAD_HOURS = 2; | |
const MAX_EVENTS_IN_WIDGET = 5; |
This file contains 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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: link; | |
/** | |
* GENERATE BEAR BACKLINKS | |
* | |
* This script will find and add backlinks in Bear. | |
* | |
* !!Please backup your notes before running!! https://bear.app/faq/Backup%20&%20Restore/ |
This file contains 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
refactor = oldCode => { | |
const defineBlock = /define\((?:['"].*?['"],\s*)?\[(.*?)\],\s*?(?:function|)\s*?\((.*?)\)/gms; | |
const match = defineBlock.exec(oldCode); | |
if (!match) { | |
return 'No matches found, error'; | |
} | |
const groupBrackets = (acc, item) => { | |
const hasBracket = { | |
left: Boolean(/\{/.exec(item)), | |
right: Boolean(/\}/.exec(item)) |
This file contains 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 play Minesweeper, we will create instances of MineSweeperGame in command line. | |
// For example: | |
// In the command line, navigate to the lib directory and run `node` | |
// Run `.load game.js` to load the contents of this file. | |
// Then create a Game instance and run commands like so: | |
// let game = new Game(3, 3, 3); | |
// game.playMove(0, 1); | |
// game.playMove(1, 2); | |
// When done run `.exit` |
This file contains 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
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.Game = undefined; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
// To play Minesweeper, we will create instances of MineSweeperGame in command line. | |
// For example: |