Skip to content

Instantly share code, notes, and snippets.

View asantoni's full-sized avatar

Albert Santoni asantoni

View GitHub Profile
@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active September 5, 2024 10:05
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
@robinlandstrom
robinlandstrom / new-wireguard-peer.sh
Last active September 6, 2024 05:08
Script to automatically add configration for a new peer to a wireguard server. It will then print a QR code to the console that can be used to add the config to the Android or OS X wireguard client.
#!/bin/bash
# MIT License
#
# Copyright (c) 2024 Robin Landström
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@njh
njh / aes67_wishlist.md
Last active September 24, 2024 08:36
AES67 Open Source Software Wishlist

AES67 (an open standard for high quality audio over IP) is becoming mainstream in the world of broadcast and professional audio industries, however there is a very limited amount of open source software available to interoperate with it. As a result we are often just replacing XLRs with Ethernet, without taking advantage of the possibilites the software give. While Virtual Soundcards enable some of this, native network implementations would allow greater flexibility.

This is my wishlist of things that would help change that. Hopefully one day it can be turned into a AES67 Awesome List.

As open source has resulted in very rapid evolution of the web, I believe the same is possible for professional/broadcast audio.

It is possible that some of this already exists and I just havn't found it yet. Please add a comment below if you know of something!

@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@thisismitch
thisismitch / haproxy.cfg
Last active July 25, 2024 03:38
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active September 22, 2024 01:52
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@robyoung
robyoung / isolation_level.py
Last active January 31, 2022 06:35
Flask-SQLAlchemy set per request isolation level
def isolation_level(level):
"""Return a Flask view decorator to set SQLAlchemy isolation level
Usage::
@main.route("/thingy/<id>", methods=["POST"])
@isolation_level("SERIALIZABLE")
def update_a_thing(id):
...
"""
def decorator(view):
@kostja
kostja / ansible-sucks
Last active October 15, 2020 11:03
Ansible vs. GNU Make
instances := $(basename $(wildcard *.lua))
hosts := n4 n6 n11 n12 n16 n17 n18 n19 n20
all:
echo "nothing"
start: clean
$(foreach i, $(instances), tarantoolctl $@ $i;)
stop:
@mikhailov
mikhailov / gist:9639593
Last active September 24, 2024 11:28
Nginx S3 Proxy with caching
events {
worker_connections 1024;
}
http {
default_type text/html;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
@claudiosanches
claudiosanches / django-runserver-ssl.md
Last active August 10, 2024 06:42
Django - SSL with runserver

Instalation

[sudo] apt-get install stunnel

Configuration

cd path/to/django/project