Skip to content

Instantly share code, notes, and snippets.

@michaellearntorock2022
michaellearntorock2022 / readme.md
Created July 17, 2025 02:01 — 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 process requires that you are able to ssh OR log in locally 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 customization-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 swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@michaellearntorock2022
michaellearntorock2022 / WindowsTimeFixUTC.reg
Created January 10, 2025 06:21 — forked from electron0zero/WindowsTimeFixUTC.reg
Fix for time zone issue in Windows + Ubuntu Dual boot
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@michaellearntorock2022
michaellearntorock2022 / Dockerfile
Created December 10, 2024 07:26
php 5.6 install zendguardloader in docker
FROM php:5.6
# install ioncube
RUN mkdir /tmp/ioncube && \
cd /tmp/ioncube && \
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && \
tar xvf ioncube_loaders_lin_x86-64.tar.gz && \
cd `php -i | grep extension_dir | cut -d' ' -f 5` && \
cp /tmp/ioncube/ioncube/ioncube_loader_lin_5.6.so . && \
echo zend_extension=ioncube_loader_lin_5.6.so > /etc/php5/apache2/conf.d/00-ioncube.ini && \
rm -rf /tmp/ioncube/
(In both Windows)
1. Go to C:\Users\{USER}\AppData\Roaming\AnyDesk
2. Copy & Paste 'thumbnails'
3. Open 'user.conf'
4. Replace the line 'ad.roster.items='
5. Done.
@michaellearntorock2022
michaellearntorock2022 / GoogleDriveServiceProvider.php
Created June 9, 2022 03:07 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@michaellearntorock2022
michaellearntorock2022 / instalike.js
Created May 10, 2022 04:53 — forked from jadeallencook/instalike.js
Script to auto like posts on Instagram.
// orginal script
// let likes = 0;
// setInterval(() => {
// const heart = document.querySelector('svg[aria-label="Like"]').parentNode;
// const arrow = document.querySelector('a.coreSpriteRightPaginationArrow');
// if (heart) {
// heart.click()
// likes++;
// console.log(`You've liked ${likes} post(s)`);