This file contains 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
// https://github.com/afry/quill-mention | |
// https://github.com/zenoamaro/react-quill | |
// <link rel="stylesheet" href="https://unpkg.com/react-quill@1.3.3/dist/quill.snow.css"> | |
// .ql-mention-list-container{width:270px;border:1px solid #f0f0f0;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px 0 rgba(30,30,30,.08);z-index:9001;overflow:auto}.ql-mention-loading{line-height:44px;padding:0 20px;vertical-align:middle;font-size:16px}.ql-mention-list{list-style:none;margin:0;padding:0;overflow:hidden}.ql-mention-list-item{cursor:pointer;line-height:44px;font-size:16px;padding:0 20px;vertical-align:middle}.ql-mention-list-item.disabled{cursor:auto}.ql-mention-list-item.selected{background-color:#d3e1eb;text-decoration:none}.mention{height:24px;width:65px;border-radius:6px;background-color:#d3e1eb;padding:3px 0;margin-right:2px;user-select:all}.mention>span{margin:0 3px} | |
import React, { useEffect, useState, Component } from 'react' | |
import './accounts.page.css' | |
import ReactQuill from 'react-quill' | |
import Qu |
This file contains 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
window.addEventListener('load', function() { | |
function registerPageView(currentSessionCookieTimestamp) { | |
const currentTimestamp = new Date().getTime() | |
const fiveMinutes = 5 * 60 * 1000 | |
if (!currentSessionCookieTimestamp) { | |
// ...PV logic... | |
} else { | |
if (currentTimestamp - currentSessionCookieTimestamp > fiveMinutes) { | |
// ...PV logic... |
This file contains 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 classNames = (object) => { | |
const classArray = []; | |
for (let property in object) { | |
if (object[property]) classArray.push(property) | |
} | |
return classArray.join(' ') | |
} |
This file contains 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
version: 2 | |
jobs: | |
build_windows: | |
docker: | |
- image: electronuserland/builder:wine | |
steps: | |
- checkout | |
- run: npm i | |
- run: npm run build:electron | |
- run: npm run pack:win |
This file contains 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
#!/bin/bash | |
ffmpeg -i input.mp4 -vcodec libx264 -acodec aac output.mp4 |
This file contains 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
############################################################################# | |
# Configuration file for Let's Encrypt ACME Challenge location | |
# This file is already included in listen_xxx.conf files. | |
# Do NOT include it separately! | |
############################################################################# | |
# | |
# This config enables to access /.well-known/acme-challenge/xxxxxxxxxxx | |
# on all our sites (HTTP), including all subdomains. | |
# This is required by ACME Challenge (webroot authentication). | |
# You can check that this location is working by placing ping.txt here: |
This file contains 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
image: docker:18.09.7 | |
services: | |
- docker:18.09.7-dind | |
stages: | |
- build | |
- push | |
- deploy |
This file contains 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
function matchPathToUrl(path, url) { | |
const sanitizedUrl = url[0] == '/' ? url.substring(1) : url | |
const sanitizedPath = path[0] == '/' ? path.substring(1) : path | |
const sanitizedUrlParts = sanitizedUrl.split('/') | |
const sanitizedPathParts = sanitizedPath.split('/') | |
const pathBoundaries = sanitizedPath.split('/').map(part => part[0] == ':' ? -1 : part) | |
let values = {} | |
const passes = pathBoundaries.reduce((pass, part, index) => { | |
if (sanitizedUrlParts.length != sanitizedPathParts.length) return false |
This file contains 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
class Keg { | |
static instance; | |
taps = {}; | |
queue = {}; | |
constructor() { | |
setInterval(() => { | |
//console.log(this.taps) | |
//console.log(this.queue) |
This file contains 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
FROM node:10 | |
MAINTAINER Jo du Plessis <jo@joduplessis.com> | |
WORKDIR /var/www/websocket |