Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
import { connect } from 'react-redux';
import Loading from '../../assets/img/loading.gif';
let contract_data = (data) => {
if (data) {
data.map(row => {
console.log(row)
class App extends React.Component {
constructor(props) {
super(props)
}
componentDidMount() {
let es = new EventSource('/stream')
es.onmessage = e => {
console.log(e.data)
}
High │ Regular Expression Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ string │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ No patch available │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ bhttp │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ bhttp > string │
├───────────────┼──────────────────────────────────────────────────────────────┤
const express = require('express');
const app = express();
const session = require('express-session');
app.use(session({
secret: 'keyboard cat',
resave: false,
saveUninitialized: true,
cookie: { secure: true }
}))
// Set up default mongoose connection
const mongoDB = 'mongodb://127.0.0.1/chatpoint';
mongoose.connect(mongoDB);
// Get Mongoose to use the global promise library
mongoose.Promise = global.Promise;
const knex = require('knex')({
client: 'sqlite3',
connection: {
filename: 'test.db'
},
debug: true
})
knex.schema.createTable('testing', (tbl) => {
tbl.increments()
{
allAirtable(filter: {table: {eq: "Events"}}) {
edges {
node {
data {
Event_Name
Sequence
Parent_Group_or_Era
Participants # result from this [personid, personid, personid]
}
import React, { Component } from 'react'
export default class componentName extends Component {
constructor(props) {
super(props);
this.state = {
data: null
}
}
@nomoney4me
nomoney4me / client.js
Created November 18, 2018 00:15
sse-practice
<!<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>