Skip to content

Instantly share code, notes, and snippets.

View ravshansbox's full-sized avatar

Ravshan Samandarov ravshansbox

View GitHub Profile
apt update && apt upgrade -y;
apt install wget -y
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip
apt install unzip -y
unzip FontPatcher.zip -d FontPatcher
apt install python3 python-is-python3 fontforge python3-fontforge -y;
./FontPatcher/font-patcher --outputdir ./out --name "MonoLisa NF Black" --complete --mono ./in/MonoLisa-Black.ttf;
./FontPatcher/font-patcher --outputdir ./out --name "MonoLisa NF BlackItalic" --complete --mono ./in/MonoLisa-BlackItalic.ttf;
./FontPatcher/font-patcher --outputdir ./out --name "MonoLisa NF Bold" --complete --mono ./in/MonoLisa-Bold.ttf;
set incsearch
set laststatus=2
set noshowmode
set ruler
set termguicolors
set ttimeout ttimeoutlen=0
set viminfo=
call plug#begin()
Plug 'catppuccin/vim', {'as': 'catppuccin'}
const name = 'RSA-OAEP';
const hash = 'SHA-256';
const modulusLength = 2048;
const publicExponent = new Uint8Array([1, 0, 1]);
const format = 'spki';
const message = 'hello';
// browser
const { privateKey, publicKey } = await crypto.subtle.generateKey(
{ name, hash, modulusLength, publicExponent },
name: Build Docker Image
on:
push:
branches: ['main']
jobs:
build_api:
runs-on: ubuntu-latest
steps:
server {
listen 443;
server_name example.com;
location / {
proxy_pass http://frontend;
}
location /api {
rewrite /api/(.*) /$1 break;
proxy_pass http://backend;
proxy_set_header Host $host;
const shallowEqual = (value1, value2) => {
if (Object.is(value1, value2)) {
return true;
}
const keys1 = Object.keys(value1);
const keys2 = Object.keys(value2);
if (Object.is(keys1.length, keys2.length)) {
return false;
}
services:
mongo1:
image: mongo
ports:
- 127.0.0.1:27017:27017
volumes:
- ./mongo1:/data/db
command: mongod --replSet replicaSet1
mongo2:
image: mongo
version: "3"
services:
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --cleanup --interval 60
swag:
server {
gzip off;
gzip_static on;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
}
FROM node:18-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . ./
RUN npm run build
RUN find ./dist -type f | xargs gzip -k
FROM nginx:1-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf