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
// Submission for "rendezvous with cassidoo" interview question of the week | |
// Subscribe to the newsletter - https://buttondown.email/cassidoo | |
// NOTE: This isn't the most efficient code... but I had to come up with a smartass method ;) | |
// Not sure if those will pass me that interview question -- but they're fun to make! | |
const sameDigits = num => { | |
const removeDupes = arr => { | |
return arr | |
.filter((num, index) => arr.indexOf(num) === index) | |
} |
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
/** | |
* This example shows how to make a quick custom widget that manages its own state in OOUI. | |
* You can then embed this widget into the DOM or into other widgets, like an OO.ui.PanelLayout | |
* or an OO.ui.PopupWidget. | |
* | |
* This enables you to encapsulate the behavior of your widget, emit your custom events, and | |
* have the structure of your display be consistent, instead of having to reconstruct things | |
* over and over in jQuery, managing inputs/buttons/etc and attaching them again independently. | |
*/ |
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
<?php | |
/** | |
* Add word count to Nova mission posts. | |
* @author Moriel Schottlender mooeypoo@gmail.com | |
* | |
* This content should go in the write_missionpost_js.php page in your | |
* `application/views/_base_override/admin/js/` folder. If the file does not yet exist in | |
* that folder, you can create it by copy/pasting the entire content of this page | |
* and saving it as the `write_missionpost_js.php` file. | |
* If the file already exists, copy over everything between the <script ...> </script> |