Skip to content

Instantly share code, notes, and snippets.

View aonrobot's full-sized avatar
💭
I may be slow to respond.

Auttawut Wiriyakreng aonrobot

💭
I may be slow to respond.
View GitHub Profile
const request = require('request');
const crypto = require("crypto");
const NEW_POKER_AGENT_URL = 'https://beta-agent.iampoker.com';
const NEW_POKER_AGENT_KEY = 'YOUR AGENT KEY [Secret Key]'; // ex. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
const NEW_POKER_AGENT_NAME = 'YOUR AGENT NAME' // ex. agentpentest
const PLAYER_USERNAME = 'YOUR PLAYER USERNAME' // ex. showpentestrekop1
function encryptData(text, secretKey) {
const byte = Buffer.from(JSON.stringify(text))
function callGetTransactionHistoryResult(account,gameId,agent,callback) {
let headers = {
'Content-Type': 'application/json',
'X-Ds-Signature' :CERT
};
let options = {
url: API_URL+'/v1/member/bet_history',
{
"name": "@abccompany/eslint",
"version": "1.0.162-20210528.beta1",
"description": "",
"main": "index.ts",
"scripts": {
"lint": "./node_modules/.bin/eslint --rule \"{no-unused-vars: off}\" .",
"test": "jest --setupFiles dotenv/config --coverage",
"test-ci": "JEST_JUNIT_OUTPUT_DIR=\"./artifacts/test\" jest --ci --testResultsProcessor=\"jest-junit\" --collectCoverage=true",
"test-watch": "jest --coverage --watch",
{
"parserOptions": {
"ecmaVersion": 2018
},
"env": {
"es6": true,
"node": true,
"commonjs": true,
"jest": true
},
{
"mapping": {
"_doc": {
"dynamic": "true",
"_meta": {},
"_source": {
"includes": [],
"excludes": []
},
"dynamic_date_formats": [

MongoDB Meeting

Mostly used collection

1. Bettransactions

Game Callback (~15 games)

new BetTransactionModel(...)
const { ObjectID } = require('mongodb');
module.exports.StreamFilter = [
// {
// "$match": { "fullDocument.memberId": new ObjectID("5f100847a1a07c7246ad5541") }
// }
];
{
"size":0,
"query":{
"bool":{
"must":[
{
"range":{
"game_date":{
"gte":"2020-05-01T11:00:00.000Z",
"lt":"2020-05-30T11:00:00.000Z"
test image
@aonrobot
aonrobot / node-folder-structure-options.md
Created May 9, 2020 18:05 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin