ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
COMPOSER_PATH=`which composer` | |
composer() { | |
if ! php5query -s cli -m xdebug >/dev/null; then | |
$COMPOSER_PATH $@ | |
return | |
fi | |
# Re-enable xdebug even after a ctrl-c (SIGINT) | |
# and clear the signal handler | |
trap 'sudo php5enmod xdebug; trap - INT' INT |
$('#mySearch').keyup(function() { | |
clearTimeout($.data(this, 'timer')); | |
var wait = setTimeout(search, 500); | |
$(this).data('timer', wait); | |
}); | |
function search() { | |
$.post("stuff.php", {nStr: "" + $('#mySearch').val() + ""}, function(data){ | |
if(data.length > 0) { | |
$('#suggestions').show(); |
<ul> | |
{% for project in pagination %} | |
<li>{{ project.name }} has {{ project.?? }} tasks</li> | |
{% endfor %} | |
</ul> |
#!/bin/sh | |
# | |
# Git hook that prevents commits to master | |
# use --no-verify to bypass this hook | |
# ex: git commit -m "init commit" --no-verify | |
branch=`git symbolic-ref HEAD` | |
if [ "$branch" = "refs/heads/master" ]; then | |
echo "Direct commits to the branch master are not allowed" | |
exit 1 |
is_processing = false; | |
last_page = false; | |
function addMoreElements() { | |
is_processing = true; | |
$.ajax({ | |
type: "GET", | |
//FOS Routing | |
url: Routing.generate('route_name', {page: page}), | |
success: function(data) { | |
if (data.html.length > 0) { |
<?php | |
namespace AppBundle\Form\Type; | |
use AppBundle\Form\DataTransformer\BooleanTypeToBooleanTransformer; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
class BooleanType extends AbstractType |
ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
{% extends 'form_div_layout.html.twig' %} | |
{% block form_row -%} | |
<div class="row{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}"> | |
<div class="input-field col s12"> | |
{{- form_widget(form) -}} | |
{{- form_label(form) -}} | |
{{- form_errors(form) -}} | |
</div> | |
</div> |
<?php | |
/** | |
* Abstract class which has helper functions to get data from the database | |
*/ | |
abstract class Base_Custom_Data | |
{ | |
/** | |
* The current table name | |
* | |
* @var boolean |
parameters | |
--level=psr2 --verbose fix $FileDir$/$FileName$ | |
working directory | |
$ProjectFileDir$ |