This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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": "jquery/jquery", | |
"version": "1.10.2", | |
"dist": { | |
"url": "http://code.jquery.com/jquery-1.10.2.js", | |
"type": "file" | |
} |
This file contains hidden or 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 | |
require 'vendor/autoload.php'; | |
// Create the mail transport configuration | |
$transport = Swift_MailTransport::newInstance(); | |
// Create the message | |
$message = Swift_Message::newInstance(); | |
$message->setTo(array( |