Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@unnamalai-kb
unnamalai-kb / bigquery.js
Created November 2, 2018 08:08
NodeJS bigquery.js
////////////////////////////////////////////////////////////////////
//
// This javascript code queries a Google Cloud BigQuery database
//
// Prerequisites:
// 1. Setup a service account (Bigquery.admin) by following the below link
// https://cloud.google.com/video-intelligence/docs/common/auth#set_up_a_service_account
// 2. create a folder adminkey on the path of the javascript and save the service account json file
// 3. Execution in NodeJS
// npm install --save @google-cloud/bigquery
@unnamalai-kb
unnamalai-kb / httpsserver.py
Created January 31, 2019 04:19
Python 3 Simple HTTPS Server
# python ../httpsserver.py
# in your browser, visit:
# https://localhost:4443
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl
httpd = HTTPServer(("localhost", 4443), SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile="../httpsserver.pem", server_side=True)
httpd.serve_forever()