Misskeyのデフォルト (めいすきーは異なる) では、master, workerの2プロセスが上がる。 masterは最初に上がるやつで、主になにもしない。 workerはmasterからforkされるプロセスで、master以外のほぼ全ての仕事を行う。
workerの数はconfigのclusterLimit
で調整できる (デフォルトは1)。
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
<title>Graph for misskey.m544.net</title> |
# Sample Nginx configuration for Misskey | |
# | |
# 1. Replace example.tld to your domain | |
# 2. Copy to /etc/nginx/sites-enabled | |
# or copy to /etc/nginx/sites-available and symlink from /etc/nginx/sites-ebabled | |
# For WebSockets | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; |
<!doctype html><html><head><meta charset=utf-8> | |
<meta property="og:title" content=""> | |
<meta property="og:description" content=""> | |
</head> |
const CHARS = '0123456789abcdef'; | |
function getTime(time: number) { | |
if (time < 0) time = 0; | |
if (time === 0) { | |
return CHARS[0]; | |
} | |
time += 0x800000000000; |
import * as fs from 'fs'; | |
import * as crypto from 'crypto'; | |
import * as stream from 'stream'; | |
import * as util from 'util'; | |
const pipeline = util.promisify(stream.pipeline); | |
export async function calcHash(path: string, algorithm: 'md5' | 'sha1' | 'sha256' = 'md5') { | |
const hash = crypto.createHash(algorithm).setEncoding('hex'); | |
await pipeline(fs.createReadStream(path), hash); |
proxy_cache_path /tmp/nginx_cache_d levels=1:2 keys_zone=cache_d:16m max_size=1g inactive=7d use_temp_path=off; | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name drive.example.tld; | |
ssl_session_cache shared:ssl_session_cache:10m; |
.marquee { | |
position: relative; | |
overflow: hidden; | |
left: 100%; | |
animation: anim-marquee 10s linear infinite; | |
} | |
.marqueeAlternate { | |
position: relative; | |
left: 100%; |