Skip to content

Instantly share code, notes, and snippets.

Более удобной и актуальной версией является эта статья с использованием traefik

https://gist.github.com/dancheskus/365e9bc49a73908302af19882a86ce52


Certbot и nginx, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 24, 2024 12:29
GLSL Noise Algorithms

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

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@Webreaper
Webreaper / docker-compose.yml
Last active April 24, 2024 12:29
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@RodrigoCMoraes
RodrigoCMoraes / install-nvidia-docker.sh
Last active April 24, 2024 12:27
Install nvidia docker in Ubuntu 18.04
#1. Update system
sudo apt-get update
#2.Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@lirenlin
lirenlin / mpd.md
Last active April 24, 2024 12:26
simple mpd and ncmpcpp setup
@paulstatezny
paulstatezny / patterns-of-enterprise-application-architecture.md
Last active April 24, 2024 12:26
Notes from Patterns of Enterprise Application Architecture by Martin Fowler

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.
@VimleshS
VimleshS / patterns-of-enterprise-application-architecture.md
Created July 25, 2018 06:17 — forked from paulstatezny/patterns-of-enterprise-application-architecture.md
Notes from Patterns of Enterprise Application Architecture by Martin Fowler

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.
@wojteklu
wojteklu / clean_code.md
Last active April 24, 2024 12:26
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@denji
denji / nginx-tuning.md
Last active April 24, 2024 12:22
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@gabrielbidula
gabrielbidula / pint.sh
Last active April 24, 2024 12:22
fake laravel pint formatter mode
#!/bin/bash
# Check if an argument was provided
if [ $# -eq 0 ]; then
echo "No file path provided."
exit 1
fi
# Use the provided argument (file path)
file="$1"