| Instance | Branch |
|---|
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 | |
| # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
| # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
| ############################################### | |
| # To use: | |
| # wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh | |
| # chmod 777 install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| echo "*****************************************" |
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
| /* | |
| Rick is a fan of logic-based games. However, he is bored of the classic ones, like Sudoku and Mastermind, since he has solved so many of them. Recently he found a new game in which one is given a string with some question marks in it. The objective is to replace all of the question marks with letters (one letter per question mark) in such a way that no letter appears next to another letter of the same kind. | |
| Write a function: | |
| function solution(riddle); | |
| that, given a string riddle, returns a copy of the string with all of the question marks replaced by lowercase letters (a−z) in such a way that the same letters do not occur next to each other. The result can be any of the possible answers as long as it fulfils the above requirements. | |
| Examples: |
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
| const { log } = console; | |
| const TTL_MN = 5 // mintes | |
| const TTL_MS = TTL_MN * 60 * 1_000 // milliseconds | |
| const MapRefs = new Map(); | |
| const Maps = new WeakMap(); | |
| function fetchStuff(someId) { | |
| const ref = MapRefs.get(someId); | |
| const map = Maps.get(ref); | |
| const expired = Date.now() - (map?.ts ?? 0) > TTL_MS |
- 💩 npm:qs
- 💩 npm:query-string
- 💩 ☢️ npm:querystring
- 💩
⚠️ npm:search
Inspired by a CSS trick I didn't know which Robin Rendle tweeted about: https://twitter.com/robinrendle/status/1050794670819663873
DOM tree representation in compact JSON -- Draft Spec, Library and CLI
Note
Publicly published under MIT License Available on GitHub and NPM
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
| const animals = { | |
| //list of ocean animals comes from https://owlcation.com/stem/list-of-ocean-animals | |
| ocean: ['Acantharea', 'Anemone', 'Angelfish King', 'Ahi Tuna', 'Albacore', 'American Oyster', 'Anchovy', 'Armored Snail', 'Arctic Char', 'Atlantic Bluefin Tuna', 'Atlantic Cod', 'Atlantic Goliath Grouper', 'Atlantic Trumpetfish', 'Atlantic Wolffish', 'Baleen Whale', 'Banded Butterflyfish', 'Banded Coral Shrimp', 'Banded Sea Krait', 'Barnacle', 'Barndoor Skate', 'Barracuda', 'Basking Shark', 'Bass', 'Beluga Whale', 'Bluebanded Goby', 'Bluehead Wrasse', 'Bluefish', 'Bluestreak Cleaner-Wrasse', 'Blue Marlin', 'Blue Shark', 'Blue Spiny Lobster', 'Blue Tang', 'Blue Whale', 'Broadclub Cuttlefish', 'Bull Shark', 'Chambered Nautilus', 'Chilean Basket Star', 'Chilean Jack Mackerel', 'Chinook Salmon', 'Christmas Tree Worm', 'Clam', 'Clown Anemonefish', 'Clown Triggerfish', 'Cod', 'Coelacanth', 'Cockscomb Cup Coral', 'Common Fangtooth', 'Conch', 'Cookiecutter Shark', 'Copepod', 'Coral', 'Corydoras', 'Cownose Ray', ' |
OlderNewer