Skip to content

Instantly share code, notes, and snippets.

@BrunIF
BrunIF / nginx-minio-static.md
Created January 18, 2024 21:24 — forked from harshavardhana/nginx-minio-static.md
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@BrunIF
BrunIF / whiptailmenu.bash
Created January 5, 2022 10:12 — forked from wafsek/whiptailmenu.bash
A Example of whiptail menu with functions
#! /bin/bash
# This program is just an example of how to make a whiptail menu and some basic commands.
# Copyright (C) 2016 Baljit Singh Sarai
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License.
@BrunIF
BrunIF / bash_strict_mode.md
Created December 30, 2021 09:22 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@BrunIF
BrunIF / gist:3100024b5d7b56f5c5752c0424d602c3
Created November 16, 2021 12:33 — forked from mikhailov/gist:9639593
Nginx S3 Proxy with caching
events {
worker_connections 1024;
}
http {
default_type text/html;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
@BrunIF
BrunIF / bot.rb
Created April 27, 2021 19:50 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@BrunIF
BrunIF / User specific host file wrapper
Created August 18, 2020 12:52 — forked from chrisswanda/User specific host file wrapper
Create a user specific host file
$HOSTALIASES no longer works with glibc (https://bugs.launchpad.net/debian/+source/glibc/+bug/1483187)
For my project, I needed to create a user specifc hosts file.
First clone this repo - https://github.com/figiel/hosts.git
################ README #####################################
hosts - wrapper for libc which provides defining host aliases in a per-user file
@BrunIF
BrunIF / WireGuard_Setup.txt
Created August 18, 2020 12:50 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@BrunIF
BrunIF / ecr-add-tag.sh
Created April 10, 2020 07:06 — forked from sportebois/ecr-add-tag.sh
Add tag to a docker image in ECR via AWS CLI
#!/usr/bin/env bash
function ecr-add-tag() {
if (( $# < 3 )); then
echo "Wrong number of arguments. Usage: ecr-add-tag ECR_REPO_NAME TAG_TO_FIND TAG_TO_ADD [AWS_PROFILE]"
return
fi
local repo_name=$1
local existing_tag=$2
local new_tag=$3
@BrunIF
BrunIF / php-pools.md
Created April 2, 2020 06:59 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@BrunIF
BrunIF / docker-compose-cors.yml
Last active February 12, 2020 08:14 — forked from iki/docker-compose.yml
Docker-compose nginx CORS proxy
version: '3.7'
services:
whoami:
image: jwilder/whoami
ports:
- 127.0.0.1:7000:8000
cors: