Skip to content

Instantly share code, notes, and snippets.

View xintongc's full-sized avatar

Xintong Cheng xintongc

  • Sun Life
  • Montreal, Quebec, Canada
View GitHub Profile
@xintongc
xintongc / dbController.js
Created February 18, 2019 18:07 — forked from FRodrigues21/dbController.js
🔎 Example of Tedious SQL Server DB controller in Node.js (non-concurrent)
var Connection = require("tedious").Connection;
var Request = require("tedious").Request;
var ConnectionPool = require("tedious-connection-pool");
// Avoiding concurrent SQL SERVER calls
var poolConfig = {
min: 1,
max: 1,
log: true
};
@xintongc
xintongc / gist:c2e27105bece980cc87dc584c1c12aa6
Created March 11, 2018 15:45 — forked from pazdera/gist:1098119
Singleton example in C++
/*
* Example of a singleton design pattern.
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,