Skip to content

Instantly share code, notes, and snippets.

View totuworld's full-sized avatar

totuworld totuworld

View GitHub Profile
@totuworld
totuworld / GameDevice.js
Last active December 23, 2016 23:07
이세계에 진입한 서버 개발 3강 자료
'use strict';
module.exports = function(sequelize, DataTypes) {
let GameDevice= sequelize.define('GameDevice', {
GameDeviceUID : { type : DataTypes.INTEGER, primaryKey: true, autoIncrement: true},
UUID:{type:DataTypes.STRING(60)},
DeviceType:{type:DataTypes.INTEGER, defaultValue:0},
MainFlag : { type : DataTypes.BOOLEAN, defaultValue:true }
}, {
timestamps: false,
@totuworld
totuworld / config.json
Last active December 23, 2016 07:14
이세계에 진입한 서버 개발 2강 자료
{
"production":{
"host":"url",
"port": 1433,
"dialect": "mssql",
"username": "replace_username",
"password": "replace_password",
"dialectOptions":{
"encrypt": true,
"database":"db"
@totuworld
totuworld / devmysql.json
Last active October 25, 2016 21:39
azuresqldb
"devMySQL": {
"host":"ja.cloudapp.net",
"port": 3306,
"dialect": "mysql",
"username": "username",
"password": "password",
"dialectOptions":{
"encrypt": true,
"database":"test"
}
GET / 200 1.863 ms - 191
GET / 200 2.008 ms - 191
@totuworld
totuworld / addgitremote
Last active May 30, 2016 08:23
Azure웹앱배포
git init
git remote add azure [웹앱 git 주소]
git commit -m "init"
git push azure master
@totuworld
totuworld / httpRequestTest.js
Created April 25, 2016 22:16
Node.js HttpRequest
'use strict';
const http = require('http');
let url = (process.env.targetURL)?process.env.targetURL:'google.com';
const options = {
hostname: url
};
@totuworld
totuworld / index.js
Last active April 14, 2016 06:55
slackwiki
'use strict';
const querystring = require('querystring');
module.exports = function(context, req) {
let parseBody = querystring.parse(req.body);
if (parseBody.text) {
context.res = {
"content-type":"application/json",
@totuworld
totuworld / build_prompt
Last active April 8, 2016 05:42
agnoster
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_context
prompt_dir
prompt_git
prompt_hg
prompt_newline
@totuworld
totuworld / index.js
Last active March 24, 2016 01:22
apple iap validation
const iap = require('in-app-purchase');
iap.config({applePassword:""});
iap.setup(function (err) {
if (err) {
return console.error('something went wrong...');
}
else {
console.log('iap init done');
const SERVICE_ACCOUNT_KEY_FILE = './key.json';
var tokenStorage = {
access_token: null,
token_type: null,
expiry_date: null
};
//access_token을 확인한다.
function CheckAccessToken() {
return new Promise(function (resolve, reject) {