This file contains hidden or 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
textSyncInstance.createEditor({ | |
docId: "1", | |
element: "#editor", | |
defaultText: 'Compose an epic...' | |
}); |
This file contains hidden or 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
const server = require('server') | |
const fetch = require('node-fetch') | |
const Chatkit = require('pusher-chatkit-server') | |
const { get, post } = server.router | |
const { json, header } = server.reply | |
const cors = [ | |
ctx => header('Access-Control-Allow-Origin', '*'), | |
ctx => |
This file contains hidden or 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
const express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
+const Chatkit = require('pusher-chatkit-server') | |
const app = express() | |
+const chatkit = new Chatkit.default({ | |
+ instanceLocator: 'YOUR INSTANCE LOCATOR', | |
+ key: 'YOUR KEY', |
This file contains hidden or 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
render() { | |
return ( | |
<div | |
style={{ | |
display: 'flex', | |
height: '100vh', | |
}} | |
> | |
<div | |
style={{ |
This file contains hidden or 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
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'NLKNguyen/papercolor-theme' | |
Plug 'pangloss/vim-javascript' | |
Plug 'christoomey/vim-tmux-navigator' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-eunuch' | |
Plug 'tpope/vim-vinegar' | |
Plug 'tpope/vim-vinegar' |
This file contains hidden or 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
const express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
const Chatkit = require('@pusher/chatkit-server') | |
const app = express() | |
const chatkit = new Chatkit.default({ | |
instanceLocator: 'YOUR INSTANCE LOCATOR', | |
key: |
This file contains hidden or 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
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
class MessageList extends Component { | |
render = () => ( | |
<ul> | |
{this.props.messages.map(message => ( | |
<li key={message.id}>{message.text}</li> | |
))} | |
</ul> |
This file contains hidden or 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
<!-- Global site tag (gtag.js) - Google AdWords: 955504922 --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-955504922"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'AW-955504922'); | |
</script> |
This file contains hidden or 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
// ./server.js | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
const Chatkit = require('pusher-chatkit-server') | |
const chatkit = new Chatkit.default({ | |
instanceLocator: 'YOUR INSTANCE LOCATOR UNDER THE "CREDENTIALS" HEADER', | |
key: |
This file contains hidden or 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
// ./src/UsernameForm.js | |
import React, { Component } from 'react' | |
import { TextInput } from 'react-desktop/macOs' | |
import { Button } from 'react-desktop/macOs' | |
class UsernameForm extends Component { | |
constructor() { | |
super() | |
this.state = { |