Skip to content

Instantly share code, notes, and snippets.

View ruudk's full-sized avatar
🔥
Fixing bugs

Ruud Kamphuis ruudk

🔥
Fixing bugs
View GitHub Profile
@kunicmarko20
kunicmarko20 / Login.php
Last active March 25, 2024 10:56
Symfony OAuth with Leage OAuth2 library
<?php
declare(strict_types=1);
namespace App;
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment;
use League\OAuth2\Client\Provider\Google as GoogleProvider;
@kbond
kbond / fix_symfony2_permissions.sh
Created January 4, 2012 16:36
Fix Symfony2 Permissions
#!/bin/sh
USER=$(whoami)
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}')
sudo chmod +a "$USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "$APACHE_USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
echo "app/cache & app/logs been properly chmod'ed for $USER and $APACHE_USER"
@Ocramius
Ocramius / Deneb\Session\SaveHandler.php
Created December 23, 2011 15:49
Session Savehandler based on Doctrine2
<?php
namespace Deneb\Session;
/**
* Manages sessions storage through \Doctrine\ORM\EntityManager
* @author Ocramius
*/
class SaveHandler implements \Zend_Session_SaveHandler_Interface {
const SESSION_ENTITY_NAME = 'Deneb\Entity\Session';