- Свободная лицензия (в идеале)
- API
- Масштабировать текст по количеству символов (в идеале)
- Быть кроссбраузерным IE9+
- Сокращать ссылки и подсвечивать ссылки
- Иметь защиту от XSS
- Конфигурироваться
- Поддерживать историю
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
/* | |
* A page where users ("agents") can edit text on a page template that is filled with model data when displayed for guests. | |
* Uses content tools library: http://getcontenttools.com/ | |
* Agents can enter #variable# to display client model data inside text blocks (e.g. client name, etc.) | |
*/ | |
<template> | |
<div> | |
<div ref="policy" |
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 waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
На максимальное количество подключений влияют определенные ограничения на стороне клиента и сервера, хотя и немного по-другому.
На стороне клиента: увеличьте диапазон эргового порта и уменьшите tcp_fin_timeout
Чтобы узнать значения по умолчанию:
sysctl net.ipv4.ip_local_port_range
sysctl net.ipv4.tcp_fin_timeout
This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.
After creating the server (droplet on DigitalOcean) log in with
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> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<style type="text/css" media="screen"> | |
body{font-family:helvetica;} | |
.abutton{width:350px;height:200px;} | |
.green{color:green;} | |
.red{color:red;} |
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
sed -n 16224,16482p filename > newfile |
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
# | |
# REQUIRES: | |
# - server (the forge server instance) | |
# - site_name (the name of the site folder) | |
# - sudo_password (random password for sudo) | |
# - db_password (random password for database user) | |
# - event_id (the provisioning event name) | |
# - callback (the callback URL) | |
# |
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 | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
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
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr | |
http://support.godaddy.com/help/article/3601/generating-a-certificate-signing-request-nginx | |
http://support.godaddy.com/help/article/4976/rekeying-an-ssl-certificate | |
# Be sure to remember to chain them! | |
cat gd_bundle-g2-g1.crt >> yourdomain.crt | |
# Move 'em | |
sudo mv yourdomain.crt /etc/ssl/certs/yourdomain.crt |
NewerOlder