Skip to content

Instantly share code, notes, and snippets.

View implicit-invocation's full-sized avatar

Dương Thành Đạt implicit-invocation

View GitHub Profile
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)
#!/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
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/test', {
useNewUrlParser: true,
useUnifiedTopology: true
});
const Score = mongoose.model(
'score',
{
userId: String,