This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// примеры команд, которые выполняются при успешном сабмите формы | |
$.ajaxFormCommands = { | |
redirect: function (target) { | |
window.location.href = target; | |
}, | |
reload: function () { | |
location.reload(); | |
}, | |
replace: function (newContent, target) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"repositories": [ | |
{ | |
"type":"package", | |
"package": { | |
"name": "l3pp4rd/doctrine-extensions", | |
"version":"master", | |
"source": { | |
"url": "https://github.com/l3pp4rd/DoctrineExtensions.git", | |
"type": "git", | |
"reference":"master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#common | |
alias h='history' | |
alias hg='history|grep' | |
alias g='grep' | |
# file system | |
alias ls='ls -GFh' | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Express\Application; | |
use Symfony\Component\HttpFoundation\Request; | |
$app = new Application(); | |
//REST API example | |
$app->match( | |
'/user', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$collectionHolder = $('#tags'); | |
$addTagLink = $('#add-tag'); | |
function addTagForm($collectionHolder, ) { | |
// Get the data-prototype explained earlier | |
var prototype = $collectionHolder.data('prototype'); | |
// get the new index | |
var index = $collectionHolder.data('index'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-sqlite php5-intl php5-cli php-apc php5-xdebug acl git | |
## configuration apache | |
sudo sed -i 's#/var/www#/vagrant#g' /etc/apache2/sites-available/default | |
sudo adduser www-data vagrant | |
## config php apache DEV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use FOS\RestBundle\Controller\Annotations\View; | |
use FOS\RestBundle\Controller\Annotations\Post; | |
use FOS\RestBundle\Controller\Annotations\Get; | |
use Symfony\Component\HttpKernel\Exception\HttpException; | |
use Nelmio\ApiDocBundle\Annotation\ApiDoc; | |
class Controller { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A { | |
protected $kernel; | |
public function handle() { | |
print 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ManyToManyTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testSynchronization() | |
{ | |
$post = new Post(); | |
$tag = new Tag(); | |
$post->addTag($tag); |
OlderNewer