Skip to content

Instantly share code, notes, and snippets.

View DevDorrejo's full-sized avatar
💭
Crazy

Walddys Emmanuel Dorrejo Céspedes DevDorrejo

💭
Crazy
View GitHub Profile
@eldadfux
eldadfux / .env
Last active June 29, 2022 05:24
Appwrite 0.14 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
@Jiab77
Jiab77 / bridged-networking-on-wireless-interface-with-kvm.md
Last active June 27, 2024 21:06
So I needed to upgrade my home "web hosting" server from a Raspberry Pi 3b to something more flexible where I could even simulate a Raspberry Pi 3b given power. The new server hardware is now an Intel NUC i7 16GB / 250Gb SSD NVME. 😁

Bridged Networking on Wireless Interface with KVM and more...

So I needed to upgrade my home "web hosting" server from a Raspberry Pi 3b to something more flexible where I could even simulate a Raspberry Pi 3b given power. The new server hardware is now an Intel NUC i7 16GB / 250Gb SSD NVME. 😁

I order to accomplish this task I had to find a way to bridge the wireless interface which is the faster one on my actual home network setup.

I've also tried to mix the functionnality from another Rapsberry Pi (3b+ this time) who's acting as WLAN to LAN bridge. More details on this setup. But this was finally a bad idea and I was not able to make it work along the virtual network bridge created by libvirt or manually created... (I will explain why later)

The main difficulty was to use the DMZ IP address given by the router and route the traffic to the guest VM's.

Server / Desktop

@rigelk
rigelk / peertube.conf
Last active June 29, 2024 15:29
a now OUTDATED httpd/Apache vhost to run PeerTube | note that only Nginx is supported by the PeerTube team, and with this or any other Apache configuration, you will likely get NO SUPPORT.
# requires WebSocket support with `a2enmod proxy_wstunnel`
# check https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=modern&openssl=1.1.1d&hsts=false&ocsp=false&guideline=5.6 for hardening security
<VirtualHost *:80 [::]:80>
ServerName peertube.example.com
ServerAdmin webmaster@example.com
Protocols h2c http/1.1
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
@mrbar42
mrbar42 / graceful.sh
Last active May 22, 2024 19:06
graceful exit for bash script with background children/subshells
#!/usr/bin/env bash
graceful_exit() {
# include this line: trap graceful_exit TERM INT HUP
echo "Exit requested..."
local timeout=${1:-4}
local list=""
for c in $(ps -o pid= --ppid $$); do
# request children shutdown
kill -0 ${c} 2>/dev/null && kill -TERM ${c} && list="$list $c" || true
@deluvas
deluvas / mod_fcgid-params.md
Last active September 13, 2020 02:25
mod_fcgid notes

Notable parameters

  • FcgidMaxProcessesPerClass
    • Default: 100
    • Maximum amount of processes per application/website/wrapper.
  • FcgidProcessLifeTime
    • Default: 3600 seconds (0 disables check)
    • Idle processes which have existed for greater than this time will be terminated, if the number of processses for the class exceeds FcgidMinProcessesPerClass.
    • Working processes shall not be terminated.
  • This process lifetime check is performed at the frequency of the configured FcgidIdleScanInterval.