Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DaanV2's full-sized avatar
🎛️
Process-reviewing

Daan Verstraten DaanV2

🎛️
Process-reviewing
View GitHub Profile
@DaanV2
DaanV2 / default.conf
Created July 11, 2023 17:09
Nginx static file provider
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
sendfile on;
sendfile_max_chunk 1m;
keepalive_timeout 60;
location = /healthz {
@DaanV2
DaanV2 / default.conf
Last active July 11, 2023 17:08
Nginx reverse proxy cache, connecting to a static file provider
# Declare a cache named static-cache
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=static-cache:2m max_size=100m inactive=7d use_temp_path=off;
proxy_cache_key $scheme$proxy_host$request_uri;
proxy_cache_lock on;
proxy_cache_use_stale updating;
server {
listen 80;
server_name _;
using System;
public class C {
public Int32 First(string Command, Int32 A, Int32 B) {
switch(Command) {
case "Add":
return A + B;
case "Substract":
return A - B;