next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt
#!/usr/bin/env python | |
# details on rabbitMQ password hashing | |
# https://www.rabbitmq.com/passwords.html#computing-password-hash | |
from __future__ import print_function | |
import base64 | |
import os | |
import hashlib | |
import struct | |
import getpass |
import React from "react"; | |
let comments = [ | |
{ | |
id: 1, | |
text: "message 1", | |
}, | |
{ | |
id: 2, | |
text: "message 2", |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any | |
# means. | |
# | |
# In jurisdictions that recognize copyright laws, the author or authors | |
# of this software dedicate any and all copyright interest in the | |
# software to the public domain. We make this dedication for the benefit |
version: '3.9' | |
services: | |
redis: | |
image: 'bitnami/redis:latest' | |
volumes: | |
- redis:/bitnami/redis/data | |
environment: | |
REDIS_PASSWORD: xcfgyvubhiuoijpKMNJkoojihuhgvcflmkn | |
networks: |
/*** function that used as middleware ***/ | |
accessToken: async (name) => { | |
if (typeof document === "undefined") return ""; | |
let token = document.cookie | |
.split(";") | |
.filter((cookie) => cookie.startsWith("token"))[0]; | |
if (!token) { | |
const response = await fetch("/api/refresh", { method: "POST" }); |
import React from 'react'; | |
type Color = string | |
interface Param { | |
id: number; | |
name: string; | |
type: "string" | "checkbox"; | |
} |
/** | |
* Plural forms for russian words | |
* @param {Integer} count quantity for word | |
* @param {Array} words Array of words. Example: ['депутат', 'депутата', 'депутатов'], ['коментарий', 'коментария', 'комментариев'] | |
* @return {String} Count + plural form for word | |
*/ | |
function pluralize(count, words) { | |
var cases = [2, 0, 1, 1, 1, 2]; | |
return count + ' ' + words[ (count % 100 > 4 && count % 100 < 20) ? 2 : cases[ Math.min(count % 10, 5)] ]; | |
} |
import React, { useState } from 'react'; | |
interface Param { | |
name: string; | |
value: string; | |
} | |
interface Model { | |
params: Param[]; | |
} |
chipher | specialty | |
---|---|---|
КАМО | 15.04.04 | |
КБМО | 12.04.04 | |
КВМО | 09.04.01 | |
КММО | 01.04.02 | |
КРМО | 15.04.06 | |
КСМО | 27.04.03 | |
КУМО | 27.04.04 | |
КФМО | ||
КАБО | 15.03.04 |