Skip to content

Instantly share code, notes, and snippets.

Avatar
🟢
Making VTU better :)

Illya Klymov xanf

🟢
Making VTU better :)
View GitHub Profile
View gist:cf26333287bae529be7cdfc20d8073ac
### Keybase proof
I hereby claim:
* I am xanf on github.
* I am xanf (https://keybase.io/xanf) on keybase.
* I have a public key ASD918LkkFgP2do7G2yTEiPkrYzT1yZ3ldyGOmry3Luw_Qo
To claim this, I am signing this object:
@xanf
xanf / gist:3638383
Created Sep 5, 2012
build.phonegap.com
View gist:3638383
#!/bin/bash
TOKEN="mytokenhere"
APP=0000100
$SENCHA_SDK_TOOLS_2_0_0_BETA3/sencha app build -e testing || exit 1
pushd ./build/testing >/dev/null
zip ../app.zip -r * >/dev/null
popd >/dev/null
echo -n "Uploading to build.phonegap.com..."
curl -s -o /dev/null -X PUT -F file=@./build/app.zip https://build.phonegap.com/api/v1/apps/$APP\?auth_token\=$TOKEN || exit 1
View CoreListener.php
<?php
namespace Application\ProdrepBundle\Security;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use FOS\UserBundle\Model\UserInterface;
class RequestListener
{
@xanf
xanf / AjaxAuthenticationListener.php
Created Jun 8, 2011
AJAX auth errors listener for Symfony2
View AjaxAuthenticationListener.php
<?php
namespace Application\ProdrepHelperBundle\Component\Event;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
/**
*/
class AjaxAuthenticationListener