Skip to content

Instantly share code, notes, and snippets.

View chindit's full-sized avatar
🦙
Lama, what else ?

David Lumaye chindit

🦙
Lama, what else ?
View GitHub Profile
@azhararmar
azhararmar / Symfony - Manual User Authentication
Last active June 21, 2024 08:44
Manually Authenticate User In Symfony
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
// Manually authenticate user in controller
$token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());
$this->get('security.token_storage')->setToken($token);
$this->get('session')->set('_security_main', serialize($token));
@mjnaderi
mjnaderi / install-arch.md
Last active July 1, 2024 12:07 — forked from mattiaslundberg/arch-linux-install
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@julienbourdeau
julienbourdeau / imgoptim
Created September 18, 2014 15:47
Find and compress JPG and PNG images (using optipng and jpegoptim) with command line
find . -name "*.png" -exec optipng '{}' \;
find . -name "*.jpg" -exec jpegoptim '{}' \;