This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import email | |
import zipfile | |
import os | |
import gzip | |
import string | |
import boto3 | |
import urllib | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var logFile = fs.createWriteStream(__dirname + config.logPath + new Date().toISOString().slice(0, 19).replace('T', ' '), { | |
flags: 'a' | |
}); | |
var logStdout = process.stdout; | |
var baseUrl = config.baseUrl; | |
console.log = function () { | |
logFile.write( | |
"\n===:" + new Date() + ":\n" + | |
util.format.apply(null, arguments) + | |
'\n===\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async.waterfall([ | |
function (nextCb) { | |
if (!topicData.user_id || typeof topicData.user_id === undefined) { | |
nextCb(null, { "response_code": 5002, "response_message": "please provide user id.", "response_data": {} }); | |
} | |
else { | |
nextCb(null, { "response_code": 2000 }); | |
} | |
}, | |
function (arg1, nextCb) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'updating the apt-get' | |
sudo apt-get update | |
sudo apt-get upgrade | |
echo 'installing google talk plugin++++ pls enter your sudo pass--------' | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/talkplugin/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get update | |
sudo apt-get install google-talkplugin | |
echo 'installing sox' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var mongoose = require('mongoose'); | |
var io = require('socket.io')(server); | |
var Schema = mongoose.Schema; | |
var fs = require('fs'); | |
var atob = require('atob'); | |
mongoose.connect('mongodb://localhost:27017'); | |
//var ctc = require('./model/ctc'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function #from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
import http.server, urllib, datetime | |
#================================================================= | |
sUrl="/chatbox" #server url | |
port=8080 #server port | |
timedRefresh="15" #time before page refreshes | |
msgBox=[] #messages held here as dict objects | |
#================================================================= | |
# create html | |
#================================================================= |