- version 3.6
Check those constraints:
$this->anything()
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
const chunks = (arr, chunkSize) => { | |
let results = []; | |
while (arr.length) results.push(arr.splice(0, chunkSize)); | |
return results; | |
}; | |
module.exports = (xs, f, concurrency) => { | |
if (xs.length == 0) return Promise.resolve(); | |
return Promise.all(chunks(xs, concurrency).reduce( | |
(acc, chunk) => acc.then(() => Promise.all(chunk.map(f))), |
This is a detailed runbook for setting up a production server on an Ubuntu 16.04 cloud VPS for automated deployment of static web content to be served by an NGINX web server and Node.js web application behind an NGINX reverse-proxy, both with SSL/TLS (https) support.
The steps are as follows:
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /web; | |
index index.html; | |
location / { | |
try_files $uri $uri/ @rewrites; |
Math.area = Math.area || function(polygon){ | |
const length = polygon.length; | |
let sum = 0; | |
for(let i = 0; i < length; i += 2){ | |
sum += polygon[i ] * polygon[(i + 3) % length] | |
- polygon[i + 1] * polygon[(i + 2) % length]; | |
} |
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
<?php | |
namespace App\Http\Crawler; | |
use Spatie\Crawler\CrawlObserver; | |
use GuzzleHttp\Exception\RequestException; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\UriInterface; | |
use Symfony\Component\DomCrawler\Crawler as DomCrawler; |
You're going to need a Google Developer's Account: https://console.developers.google.com/ | |
https://console.cloud.google.com/projectselector2/home/dashboard?authuser=2&organizationId=0&supportedpurview=project | |
You'll need to know what you want your Portainer URL to be. | |
Create a Project | |
Enter a Project Name and click "Create" | |
APIs & Services |