firebase init hosting:github
firebase firestore:indexes
firebase deploy --only firestore:indexes
// YouTube API video uploader using JavaScript/Node.js | |
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s | |
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs | |
// | |
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const assert = require('assert') | |
const {google} = require('googleapis'); |
Tmux is a terminal multiplexer. It allows you to run and manage several command prompts simultaneously from one tmux session. It is the equivalent of a graphical window manager, for command prompts.
sudo apt-get update && sudo apt-get -y install tmux
sudo apt-get install tmux
NodeSource is a company focused on providing enterprise-grade Node support. It maintains an APT repository containing multiple Node.js versions. Use this repository if your application requires a specific version of Node.js.
At the time of writing, NodeSource repository provides the following versions:
v14.x - The latest stable version. v13.x v12.x - The latest LTS version. v10.x - The previous LTS version.
import logging | |
sysdate = str(datetime.date.today()) | |
logging.basicConfig(filename=sysdate+'.log', | |
filemode='a', | |
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', | |
datefmt='%H:%M:%S', | |
level=logging.DEBUG) | |
logging.info('anp main') |
import sqlite3 | |
class Offline: | |
def __init__(self): | |
print('hello offline') | |
self.conn = sqlite3.connect('offline.db') | |
c = self.conn.cursor() | |
c.execute('''CREATE TABLE IF NOT EXISTS visitors (id INTEGER PRIMARY KEY, clientId text, locationId text, cameraNumber text, frame text)''') | |
c.execute('''CREATE TABLE IF NOT EXISTS errors (id INTEGER PRIMARY KEY, clientId text, locationId text, cameraNumber text, frame text, errors text, er_cat text)''') | |
# sql1 = 'DELETE FROM Frames_and_Scores' | |
# c.execute(sql1) |