Instance | Branch |
---|
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
{ | |
"basics": { | |
"name": "John Doe", | |
"label": "Programmer", | |
"image": "", | |
"email": "john@gmail.com", | |
"phone": "(912) 555-4321", | |
"url": "https://johndoe.com", | |
"summary": "A summary of John Doe…", | |
"location": { |
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
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 |
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
/* | |
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 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
# [DESKTOP] | |
#require("electron").webFrame.setZoomFactor(1) | |
# [LAPTOP] | |
#require("electron").webFrame.setZoomFactor(1.5) | |
#require("electron").webFrame.setZoomFactor(0.8) | |
#require("electron").webFrame.setZoomFactor(0.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
#!/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 "*****************************************" |