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 mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/test', {
useNewUrlParser: true,
useUnifiedTopology: true
});
const Score = mongoose.model(
'score',
{
userId: String,
#!/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 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)
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input type="text" name="username" />
<ul id="repo-list"></ul>
<script type="text/javascript" src="repo-search-app.js"></script>
</body>
package com.mygdx.game;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import React, { Component } from 'react';
import './App.css';
class App extends Component {
state = {
op1: [100, 100],
op2: [200, 100],
op3: [200, 200],
op4: [100, 200],
{
"port": 8080,
"mongodbUrl": "mongodb://localhost/dike",
"ethUrl": "http://localhost:8545",
"mainEthereumWallet": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
"activationFee": "10000000000000000",
"bodyLimit": "100kb",
"tokenLifespan": 0,
"smtp": {
"host": "smtp.sendgrid.net",
This file has been truncated, but you can view the full file.
package com.dongbat.example.game;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.VertexAttribute;
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;