Skip to content

Instantly share code, notes, and snippets.

View reytech-dev's full-sized avatar

Reytech reytech-dev

View GitHub Profile
@reytech-dev
reytech-dev / kernel-panic-boot.md
Created July 21, 2021 09:18
Centos7 - No filesystem could mount root
@reytech-dev
reytech-dev / kdeconnect-app-compilation.md
Last active June 1, 2021 12:31
Prepare environment and compile kdeconnect-app with QT 5.15.0

Prepare local build environment and compile kdeconnect-app

The following instructions where tested with ubuntu 20.04.

The following module builds of kdeconnect-app will fail with the given instructions (so far, will update the gist asap I found out whats missing):

Requirements

  1. QT 5.15.0
  2. extra-cmake-modules 3.16.3
  3. kdesrc-build
  4. gcc
@reytech-dev
reytech-dev / nginx_proxy_pass.md
Created May 28, 2021 10:13
Nginx location, proxy_pass path/subdir missing

NGINX location with proxy_pass

Example configuration

location /example {
  set $exampleVariable "examplePath";
  proxy_pass http://localhost:8080/$exampleVariable;
}
@reytech-dev
reytech-dev / create-cloud-template.sh
Last active May 1, 2021 19:12 — forked from Oratorian/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@reytech-dev
reytech-dev / howto.md
Created January 21, 2021 21:22
Auto-mount LUKS partition

Mount an encrypted partition on boot

Hint: Always replace "< .... >" with the actual value

  1. Find out which name the partition has
$ lsblk
  1. Receive UUID of device
@reytech-dev
reytech-dev / Fix.md
Last active March 20, 2024 10:19
ZONE_CONFLICT: 'docker0' already bound to a zone
  1. Check if docker zone exists in firewall-cmd
$ firewall-cmd --get-active-zones
  1. If "docker" zone is available, change interface to docker0 (not persisted)
$ sudo firewall-cmd --zone=docker --change-interface=docker0
  1. If "docker" zone is available, change interface to docker0 (persisted, thanks rbjorklin)
@reytech-dev
reytech-dev / Docker networking
Created November 14, 2020 20:28
Docker networking with firewalld
Source: https://stackoverflow.com/questions/40214617/docker-no-route-to-host
# Firewalld settings
1. open all IPs starts with "172" so that all the containers may communicate each other
```shell
$ sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv4 source address=172.0.0.0/8 accept'
```
2. make our container able to visit the network outside
```shell
@reytech-dev
reytech-dev / error-vmlinux-x-x.md
Created August 22, 2020 18:23
Steps to fix 'error file /boot/vmlinuz-x.x not found'

Steps to fix "error file '/boot/vmlinux-x.x-x86_64' not found (Manjaro)

  1. Create Live Stick with Manjaro
  1. Change UEFI Settings on your broken system: Boot > Secure Boot > Other OS (You can also disable UEFI, but make sure to re-enable it after you are done here!!)
  2. Boot broken system with the live-system
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This script is made and tested for GET requests, please change the required params for other types of requests //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - sha256 of empty input
date_default_timezone_set("UTC");
// Region where the space is hosted (amsterdam)
$region = "ams3";
// Host of the space without protocol
@reytech-dev
reytech-dev / OAuth Twitter
Last active March 31, 2018 15:55
OAuth code snippet for Twitter API (Use curl or GuzzleHttp)
<?php
/**
* Generates a 42 chars random string (No need to change it)
*/
$oauth_nonce = preg_replace("/[^A-Za-z0-9 ]/", "", base64_encode(random_bytes(32)));
/**
* Get current unix timestamp (careful what is set as Locale in your PHP environment - No need to change it)
*/
$oauth_timestamp = time();
/**