Skip to content

Instantly share code, notes, and snippets.

View broland07's full-sized avatar
🏠
Working from home

Balla Roland broland07

🏠
Working from home
View GitHub Profile
@tomdaley92
tomdaley92 / README.md
Last active May 29, 2024 05:14
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

@AVAtarMod
AVAtarMod / onchange.sh
Last active August 19, 2021 06:59 — forked from senko/onchange.sh
Watch entered directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
# Modified by: Grigory Stupnikov
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
@bschaatsbergen
bschaatsbergen / docker-compose.yml
Created May 10, 2021 20:20
Dockerized TeamCity cluster
version: '3.1'
# ./buildserver_pgdata - Postgres DB data
# ./data - TeamCity data directory
# ./teamcity-server-logs1 - logs of primary TeamCity server
# ./teamcity-server-logs2 - logs of secondary TeamCity server (running-builds node)
# ./teamcity-server-logs3 - logs of read-only TeamCity server (secondary node)
# ./teamcity-agent-conf1 - conf directory for the build agent
# ./teamcity-agent-conf2 - conf directory for the build agent
# ./teamcity-agent-conf3 - conf directory for the build agent
@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
# 1. Open the file
file = open("some_file.txt")
# 2. Perform some operations with the file
text_data = file.read()
# 3. Close the file
file.close()
@Anuj-Tiwari-IBM
Anuj-Tiwari-IBM / PY0101EN-5.3_Requests_HTTP.ipynb
Created April 6, 2021 18:18
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amithgc
amithgc / sendEmail.sh
Last active December 21, 2023 06:01
Send EMAIL via SendGrid API using Shell Script
#!/bin/bash
# Author: Amith Chandrappa
# Usage
# Options:
# -t: To Emails, Separated by ";"
# -c: CC Emails, Separated by ";"
# -b: BCC Emails, Separated by ";"
# -s: Subject
# -o: Email body
@skutov
skutov / README
Last active December 29, 2023 07:01
Configuring VLANS in Proxmox Network Interfaces
This is a quick brain dump to hopefully help explain the other files here.
/etc/network/interfaces is from my working proxmox install with an overly complicated VLAN setup. All configuration is
based off a forum post by x307 which I have copied here for reference.
My server has 2 sets of NICs hooked up to 2 seperate switches, my main switch runs traffic for management, applications,
and general home devices. I have a seperate swtich for SAN and Corosync traffic.
eno1 & eno2 are onboard NICs that are teamed in a LAG to the main switch. Proxmox has an IP address on VLAN 10 for
management, VMs can then access VLANs 1, 10, 20 and 999 through the LAG as needed (home, management, applications and
@krabben77
krabben77 / ddns-api.php
Created February 10, 2021 19:21 — forked from fredsted/ddns-api.php
Virtualmin Dynamic DNS (DDNS) server
<?php
// This script receives DDNS updates via HTTP
// example: http://server/ddns-api.php?name=home = updates home.domain.com to IP of requester
define('DDNS_DATA_FILE', '/home/ddns/ddns.json');
define('DDNS_DOMAIN', 'example.com');
header("Content-type: text/plain");