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
@skutov
skutov / README
Last active August 19, 2025 12:19
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
@kjfs
kjfs / delete-vpc.sh
Last active May 9, 2021 10:39 — forked from cjp/delete-vpc.sh
Delete AWS VPC including dependencies
#!/bin/sh -eu
#
# Delete a VPC and its dependencies
if [ -z "$1" ] then
echo "usage: $0 <vpcid>"
exit 64
fi
vpcid="$1"
@wargio
wargio / wigeguard_setup.md
Created February 6, 2021 19:03 — forked from atomlab/wigeguard_setup.md
Wireguard setup on Ubuntu 18.04

Wireguard setup on Ubuntu 16.04/18.04

Install

# sudo add-apt-repository ppa:wireguard/wireguard
# sudo apt-get update
# sudo apt-get install wireguard

Generate keys

@koveseb
koveseb / batch_resize.sh
Created February 6, 2021 18:50
Resizes batches of images
#!/usr/bin/env bash
# Purpose: batch image resizer
# Source: https://guides.wp-bullet.com
# Author: Mike
# absolute path to image folder
FOLDER="images"
# max height
HEIGHT=800
fajok = {
'1': {'name': 'bogarak', 'value': []},
'2': {'name': 'emberek', 'value': ["Arpi", "Berni"]},
'3': {'name': 'allatok', 'value': ["Hamu", "Negro"]},
'4': {'name': 'emlosok', 'value': []},
}
for f in fajok:
print(f, '----', fajok[f]['name'])
@tomaszfer
tomaszfer / create_dir.py
Created February 6, 2021 18:39
[python] Create directory if not existing
import os
def create_dir(path):
if not os.path.exists(path):
os.makedirs(path)
@OfficialOzzy
OfficialOzzy / php-install-from-source.sh
Created January 26, 2021 15:40
Download PHP and Build from Source
#!/bin/bash
PHP_VERSION=$1
WORKDIR=$(pwd)
DOWNLOAD_FILE="php-$PHP_VERSION.tar.gz"
TAR_OUT_DIR="$WORKDIR/php-src-php-$PHP_VERSION"
curl -O -L https://github.com/php/php-src/archive/$DOWNLOAD_FILE
tar -zxvf "$WORKDIR/$DOWNLOAD_FILE"
@peterkulik
peterkulik / Leaderboard.py
Last active May 9, 2021 10:38
Leaderboard #helptoothers
class User:
def __init__(self, name):
self.name = name
class Position:
def __init__(self):
self._position = []
def __getitem__(self, item) -> User:
@sanskritkm
sanskritkm / 2019-https-localhost.md
Created October 12, 2020 17:37 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Each query in MySQL is running as its own transaction, assuming you didn't change this default configuration, and unless you're starting a transaction manually and running multiple deletes in that one transaction.

Because every query is a transaction, MySQL has to save the data being deleted in case of a rollback. Large deletes means saving a TON of data for that potential case.

Additionally, deletes cause a LOT of writes to the binary log. When the delete completes, the query/results of the delete are committed to the binary log,