Skip to content

Instantly share code, notes, and snippets.

View sub314xxl's full-sized avatar

Konstantin Mokhnatkin sub314xxl

  • Moscow, Russian Federation
View GitHub Profile
@axelbdt
axelbdt / django-postgresql-15.md
Last active July 10, 2024 15:46
# Django and PostgreSQL 15, the rules have changed

Django and PostgreSQL 15, the rules have changed

Postgres 15 is just out, and while there is a lot to love about this new release, you're in for a surprise if you try to set it up with Django following tutorials like this one.

The reason is stated in the release announcement:

Remove PUBLIC creation permission on the public schema (Noah Misch) The new default is one of the secure schema usage patterns that Section 5.9.6 has recommended...

Provided your web app doesn't access your database as a superuser (it shouldn't) and uses a dedicated user, it is not allowed to use the public schema anymore. You have to create one for this specific user, and the next section will

@taskylizard
taskylizard / fmhy.md
Last active July 23, 2024 09:24
/r/freemediaheckyeah, in one single file (view raw)
@sebastian-de
sebastian-de / laptop_unsuck.json
Last active June 23, 2024 18:15
Easy Effects preset to improve the sound of the Thinkpad P14s Gen 2 AMD built-in speakers . An updated version can be found here: https://github.com/sebastian-de/easyeffects-thinkpad-unsuck
{
"output": {
"bass_enhancer": {
"amount": 22.0,
"blend": 0.0,
"floor": 10.0,
"floor-active": true,
"harmonics": 9.999999999999995,
"input-gain": 0.0,
"output-gain": -8.0,
@jeosadn
jeosadn / .gitignore
Last active December 20, 2022 20:46 — forked from rptb1/.gitignore
Convert YouTube subscriptions exported via Google Takeout into OPML
*~
@nitred
nitred / optimal_mtu.md
Last active July 16, 2024 11:51
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
Aspect or Feature kubernetes/ingress-nginx nginxinc/kubernetes-ingress with NGINX nginxinc/kubernetes-ingress with NGINX Plus
Fundamental
Authors Kubernetes community NGINX Inc and community NGINX Inc and community
NGINX version Custom NGINX build that includes several third-party modules NGINX official mainline build NGINX Plus
Commercial support N/A N/A Included
Implemented in Go/Lua (while Nginx is written in C) Go/Python Go/Python
Load balancing configuration via the Ingress resource
@ruanbekker
ruanbekker / awscli_v2_ubuntu.md
Created February 23, 2021 12:29
Install AWS CLI Version 2 on Ubuntu 20
$ apt update
$ apt search awscli
$ apt install curl wget unzip -y
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ ./aws/install
$ aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/4.19.121-linuxkit exe/x86_64.ubuntu.20 prompt/off
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 23, 2024 08:14
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@antonkomarev
antonkomarev / git-io-custom-url.md
Created September 15, 2020 08:50 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@oofnikj
oofnikj / answerfile
Last active July 20, 2024 07:10
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"