Skip to content

Instantly share code, notes, and snippets.

View heavensloop's full-sized avatar
🏠
Working from home

Popsana Noble Barida heavensloop

🏠
Working from home
View GitHub Profile
@heavensloop
heavensloop / setup-brew-on-multi-user.md
Created April 22, 2024 13:36
Setup brew on multi-user account

Setup multi user

Method one - Use one brew installation for all accounts (buggy)

echo $(brew --prefix)
echo $(groups $(whoami))
sudo dseditgroup -o edit -a $(whoami) -t user admin
sudo chgrp -R admin $(brew --prefix) 
sudo chmod -R g+rwX $(brew --prefix)
ls -lah $(brew --prefix)
@heavensloop
heavensloop / Symfony_Upgrade_Route_Method_Annotations.md
Last active June 13, 2020 20:52
Symfony: Update Deprecate Route/Method annotations for Symfony 5.2

Upgrading Symfony Route/Method Annotations for Symfony 5.x.

In the feat to update Route annotations from the deprecated Sensio\Bundle\FrameworkExtraBundle\Configuration\Method and Sensio\Bundle\FrameworkExtraBundle\Configuration\Method to use Symfony\Component\Routing\Annotation\Route.

First of all I fixed the routes cos I realized I had some routes that ended with double closing bracket: ")".

The Fix:

Replace:

@heavensloop
heavensloop / return_early.php
Last active May 13, 2022 15:04
Returning a http response while continuing a process after closing the connection
<?php
public function sendEarlyResponseHeaders($res)
{
// Buffer all upcoming output...
ob_start();
// Send your response.
echo json_encode($res);