Skip to content

Instantly share code, notes, and snippets.

View davidrfyt's full-sized avatar
🌍
Visit my in https://starzone.se/

Lydiel davidrfyt

🌍
Visit my in https://starzone.se/
View GitHub Profile
@davidrfyt
davidrfyt / readme.md
Created March 23, 2022 17:31 — forked from troyfontaine/readme.md
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and

Step 1 - Copy /home Contents

To backup the contents of /home, do the following:

@davidrfyt
davidrfyt / cfban.php
Created March 15, 2022 00:25 — forked from andrieslouw/cfban.php
Cloudflare V4 PHP API - block / unblock IP in firewall
<?php
/**
* @author https://github.com/andrieslouw
* @copyright 2016
**/
function cfban($ipaddr){
$cfheaders = array(
'Content-Type: application/json',
'X-Auth-Email: [email protected]',