Skip to content

Instantly share code, notes, and snippets.

@jehaby
jehaby / index.php
Created July 29, 2015 18:58
test gist
echo 'hw!';
@jehaby
jehaby / Gulpfile.js
Last active July 3, 2021 11:29 — forked from nateajohnson/Gulpfile.js
Gulpfile.js example that splits vendor and app bundles
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var rename = require('gulp-rename');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var gzip = require('gulp-gzip');
var concat = require('gulp-concat');
var bowerResolve = require('bower-resolve');
@jehaby
jehaby / data
Created November 6, 2015 20:51
{ "items": [
{"firstName": "Who", "lastName": "Chu", "education": "college", "towns": "Moscow"}
]}
@jehaby
jehaby / config.yml
Created March 22, 2016 08:22
Normalize keys question
liip_imagine:
normalize_keys: false
some_values:
which-i-want-to-see-with-dashes:
..
because-my-boss-wants-dashes:
@jehaby
jehaby / Apicontroller.php
Created March 30, 2016 14:19
2 of one fields valid
<?php
namespace AppBundle\Controller;
...
class ApiController extends Controller
{
/**
* @Route("...")
@jehaby
jehaby / SomeController.php
Last active April 12, 2016 11:01
Static pages with Symfony
<?php
class SomeController extends Controller {
/**
* @Route("/speaker/{slug}", name="speaker")
*/
public function speakerAction($slug)
{
@jehaby
jehaby / post-merge
Last active May 5, 2016 07:14
git hooks for Symfony deploy
#!/bin/bash
# for Symfony 3.0+
./bin/console cache:clear -e prod
#for Symfony 2*
./app/console cache:clear -e prod
@jehaby
jehaby / README.md
Last active January 25, 2024 14:43 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@jehaby
jehaby / array_replace_recursive_overwrite.php
Created May 10, 2016 10:06
Enchantment of PHP's array_replace_recursive
<?php
if (!function_exists('array_replace_recursive_overwrite')) {
function array_replace_recursive_overwrite($array, $array1)
{
$recurse = function ($array,$array1) use (&$recurse)
{
foreach ($array1 as $key => $value) {
@jehaby
jehaby / docker_install_ru.md
Last active August 9, 2017 15:07
docker_install_ru.md
  1. Ставим по инструкции с офсайта
  2. Для линуксов: добавляем юзера в группу докера sudo usermod -aG docker $USER
  3. Ставим докер-композ: https://docs.docker.com/compose/install/