This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:
- Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
- Windows 10 on my PC to work.
/** | |
* Rotates coordinate system for velocities | |
* | |
* Takes velocities and alters them as if the coordinate system they're on was rotated | |
* | |
* @param Object | velocity | The velocity of an individual particle | |
* @param Float | angle | The angle of collision between two objects in radians | |
* @return Object | The altered x and y velocities after the coordinate system has been rotated | |
*/ |
// Display: | |
// appearance | |
// box-align | |
// box-flex | |
// box-sizing | |
// box-orient | |
// box-pack | |
// display-box | |
// overflow-sroll | |
// user-select |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
#!/bin/bash | |
# Exit on the first command that returns a nonzero code. | |
set -e | |
# Function that checks if a given executable is on the path. If it isn't, prints an install message and exits. | |
# Usage: check_binary EXECUTABLE_NAME INSTALL_MESSAGE | |
check_binary() { | |
if ! which "$1" > /dev/null; then | |
# Using a subshell to redirect output to stderr. It's cleaner this way and will play nice with other redirects. |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Particles</title> | |
<meta charset="utf-8"> | |
<meta name="author" content="Laurent Houdard | cables.and.pixels"> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<link rel="icon" href="data:;base64,iVBORw0KGgo="> | |
<style> | |
body { margin: 0; overflow: hidden; } |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.[Unit] | |
Description=NGINX HTTP and reverse proxy server | |
After=syslog.target network.target nss-lookup.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/nginx.pid | |
ExecStartPre=/usr/sbin/nginx -t | |
ExecStart=/usr/sbin/nginx | |
ExecReload=/usr/bin/kill -s HUP $MAINPID |