Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8
c характеристиками:
CPU - 1 ядро x 500 МГц
// @see http://www.competa.com/blog/chrome-bug-pageup-pagedown-textarea-moves-website-window/ | |
// @see https://bugs.chromium.org/p/chromium/issues/detail?id=890248 | |
document.querySelector('textarea').addEventListener('keydown', event => { | |
if (event.key === 'PageUp' || event.key === 'PageDown') { | |
const cursorPosition = event.key === 'PageUp' ? 0 : event.target.textLength; | |
event.preventDefault(); | |
event.target.setSelectionRange(cursorPosition, cursorPosition); | |
} | |
}); |
Можно в их редакторах придумать внешний вид письма и затем скопировать html. А так же и вовсе делать через них большие рассылки.
'use strict' | |
const timeout = ms => new Promise(res => setTimeout(res, ms)) | |
function convinceMe (convince) { | |
let unixTime = Math.round(+new Date() / 1000) | |
console.log(`Delay ${convince} at ${unixTime}`) | |
} | |
async function delay () { |
#!/usr/bin/env python | |
# Source: http://code.activestate.com/recipes/325905-memoize-decorator-with-timeout/#c1 | |
import time | |
from functools import wraps | |
class MWT: | |
"""Memoize With Timeout""" | |
_caches = {} | |
_timeouts = {} |
Library | Input | Output | Gzip | Stars | 1 emit (ops/sec) | many ons and emits ↓ |
---|---|---|---|---|---|---|
chrisdavies/eev | 2.02 KB | 1.00 KB | 457 b | 166 | 9 722 398 | 362 175 |
alexanderGugel/micro-events | 3.55 KB | 1.53 KB | 611 b | 20 | 8 313 328 | 268 100 |
primus/eventemitter3 | 8.50 KB | 3.24 KB | 993 b | 1010 | 36 762 683 | 266 752 |
riot/riot | 8 045 274 | 147 673 | ||||
Nicolab/evemit | 4.18 KB | 1.16 KB | 494 b | 15 | 3 634 852 | 139 524 |
Gozala/events | 8.33 KB | 3.94 KB | 1.17 KB | 378 | 48 177 783 | 130 989 |
developit/mitt | 1.47 KB | 304 (465) B |
<?php | |
define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN_NAME'); | |
define('MAILGUN_KEY', 'KEY'); | |
function sendmailbymailgun($to,$toname,$mailfromnane,$mailfrom,$subject,$html,$text,$tag,$replyto){ | |
$array_data = array( | |
'from'=> $mailfromname .'<'.$mailfrom.'>', | |
'to'=>$toname.'<'.$to.'>', | |
'subject'=>$subject, | |
'html'=>$html, |
/** | |
* Advanced Window Snap | |
* Snaps the Active Window to one of nine different window positions. | |
* | |
* @author Andrew Moore <[email protected]> | |
* @version 1.0 | |
*/ | |
/** | |
* SnapActiveWindow resizes and moves (snaps) the active window to a given position. |