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 getRepos = (username, cb) => { | |
setTimeout(() => { | |
cb([`${username}#1`, `${username}#2`, `${username}#3`, `${username}#4`]); | |
}, Math.random() * 1000); | |
}; | |
const getAllRepos = (usernames, cb) => {}; | |
getAllRepos(['google', 'Facebook', 'github'], allRepos => | |
console.log(allRepos) |
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/sh | |
# chkconfig: 2345 90 10 | |
# description: Start or stop the Shadowsocks R server | |
# | |
### BEGIN INIT INFO | |
# Provides: Shadowsocks-R | |
# Required-Start: $network $syslog | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost:27017/test', { | |
useNewUrlParser: true, | |
useUnifiedTopology: true | |
}); | |
const Score = mongoose.model( | |
'score', | |
{ | |
userId: String, |
OlderNewer