Skip to content

Instantly share code, notes, and snippets.

View davidsaccavino's full-sized avatar

David davidsaccavino

View GitHub Profile
.App {
text-align: center;
}
.App-logo {
animation: App-logo-spin infinite 5s linear;
height: 80px;
}
.App-header {
'use strict';
const express = require('express');
// const socket = require('socket.io');
const path = require('path');
const PORT = process.env.PORT || 3001;
const INDEX = path.join(__dirname, '/build/index.html');
const server = express()
var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
const io = require('socket.io')();
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var app = express();
const io = require('socket.io')();
io.on('connection', (client) => {
client.on('chat message', msg => {
console.log(msg);
io.emit('message', msg);
});
});
const port = 8000;
import React, { Component } from 'react';
import './App.css';
import logo from './logo.svg';
import openSocket from 'socket.io-client';
const socket = openSocket(process.env.PORT || '3000');
class App extends Component {
constructor(props) {
super(props);
/*
this is the server.js file
*/
io.on('connection', (client) => {
client.on('helloUser', () => {
console.log('sending');
let video;
let poseNet;
let poses = [];
function setup() {
createCanvas(640, 480);
video = createCapture(VIDEO);
video.size(width, height);
// Create a new poseNet method with a single detection
let video;
let poseNet;
let poses = [];
function setup() {
createCanvas(640, 480);
video = createCapture(VIDEO);
video.size(width, height);
// Create a new poseNet method with a single detection
let video;
let poseNet;
let poses = [];
function setup() {
createCanvas(640, 480);
video = createCapture(VIDEO);
video.size(width, height);
// Create a new poseNet method with a single detection
import discord, re
client = discord.Client()
TOKEN = 'your token here'
url = 'https://us17.campaign-archive.com/?u=b0c288d012c3990e6593e76e1&id=79473da32d&e=eb0d880e49'
p = re.compile(r'learn\.joma\.io|joma\'?s (?:resume|cv)')
@client.event