Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8
c характеристиками:
CPU - 1 ядро x 500 МГц
/* | |
(c) by Thomas Konings | |
Random Name Generator for Javascript | |
*/ | |
function capFirst(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
function getRandomInt(min, max) { |
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2... | |
# This also works perfectly for all static file content in all projects | |
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config. | |
# Example: | |
# http://example.com - Main Laravel site as usual | |
# http://example.com/about - Main Laravel site about page as usual | |
# http://example.com/robots.txt - Main Laravel site static content as usual | |
# http://example.com/api/v1 - Lumen v1 api default / route | |
# http://example.com/api/v1/ - Lumen v1 api default / route |
... | |
gzip on; | |
gzip_static on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_proxied any; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_buffers 16 8k; | |
gzip_http_version 1.1; |
Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.
This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.
UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.
Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:
function main(){ | |
var currentAccount = AdsApp.currentAccount(); | |
var todayCost = AdsApp.currentAccount().getStatsFor("TODAY").getCost(); // Затраты сегодня | |
var yesterdayCost = AdsApp.currentAccount().getStatsFor("YESTERDAY").getCost(); // Затраты вчера | |
var todayClicks = currentAccount.getStatsFor("TODAY").getClicks(); // Клики сегодня | |
var yesterdayClicks = currentAccount.getStatsFor("YESTERDAY").getClicks(); // Клики вчера | |
var monthCost = AdsApp.currentAccount().getStatsFor("THIS_MONTH").getCost(); // Затраты за этот месяц | |
var pastmonthCost = AdsApp.currentAccount().getStatsFor("LAST_MONTH").getCost(); // Затраты за предыдущий месяц | |
var todayCpc = currentAccount.getStatsFor("TODAY").getAverageCpc(); // Цена за клик сегодня | |
var todayImpressions = currentAccount.getStatsFor("TODAY").getImpressions(); // Кол-во показов сегодня |
#!/usr/bin/env bash | |
echo " | |
---------------------- | |
NODE & NPM | |
---------------------- | |
" | |
# add nodejs LTS ppa (personal package archive) from nodesource | |
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - |
const pw = require('playwright'); | |
const UserAgent = require('user-agents'); | |
const uuid = require('uuid'); | |
const tmp = require('tmp-promise'); | |
const UINT32_MAX = (2 ** 32) - 1; | |
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D |