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 / show-images-tag.sh
Created August 4, 2020 14:32
AWS snippets
# Show Time (UNIX), Digest (images hash), tag. Sort by time
aws ecr describe-images --repository-name "ecr-repository-name" | jq -r '.imageDetails[] | (.imagePushedAt|tostring) + " " + .imageDigest + " " + .imageTags[0]' | sort
@BrunIF
BrunIF / ansible-get-remote-path.yml
Created August 3, 2020 14:28
Ansible get PATH from .zshrc
---
- hosts: localhost
tasks:
- shell: . $HOME/.zshrc && echo $PATH
args:
executable: /bin/zsh
register: path
- debug: msg="{{ path.stdout }}"
@BrunIF
BrunIF / shell
Last active July 10, 2020 08:10
Own shell example
shell() {
TOPCMD=$@ bash -c 'while read -p "${TOPCMD##*/}> " -ra sub; do
case ${sub[0]:-} in
"") continue;;
exit) exit;;
escape) (set -x; ${sub[@]:1});;
*) (set -x; ${TOPCMD} ${sub[@]});;
esac
done'
}