Skip to content

Instantly share code, notes, and snippets.

View xanf's full-sized avatar
🟢
Making VTU better :)

Illya Klymov xanf

🟢
Making VTU better :)
View GitHub Profile
@xanf
xanf / AjaxAuthenticationListener.php
Created June 8, 2011 19:20
AJAX auth errors listener for Symfony2
<?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
<?php
namespace Application\ProdrepBundle\Security;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use FOS\UserBundle\Model\UserInterface;
class RequestListener
{
@xanf
xanf / gist:3638383
Created September 5, 2012 15:26
build.phonegap.com
#!/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
### 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: