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
/* | |
* Example of making an async React Native call to a .NET Web API 2 project. | |
* Helped with this issue a few times now.. Note the content type. | |
*/ | |
(async () => { | |
// Make the API call | |
fetch(constants.API_ROUTE+'Token', { | |
method: 'POST', | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<video autoplay controls></video> | |
<button onClick="javascript:start()">Connect</button> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<style> | |
* { | |
font-family: sans-serif; | |
outline: none; | |
text-decoration: none; |
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
// 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
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
image: node:7.10.1 | |
pipelines: | |
default: | |
- step: | |
script: | |
- node -v | |
- npm install | |
- apt-get update | |
- apt-get install -y lftp | |
- lftp -u USERNAME,PASSWORD FTPDOMAIN -e "mirror -e -R -p ./dist/ public_html ; quit" |
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: |