Skip to content

Instantly share code, notes, and snippets.

View vukanac's full-sized avatar
🎯
Focusing

Vladimir Vukanac vukanac

🎯
Focusing
View GitHub Profile
@ziadoz
ziadoz / Version20121011141021.php
Created October 11, 2012 20:53
Doctrine DBAL and Migrations Example
<?php
/*
* /path/to/migrations/directory/Version20121011141021.php
*/
namespace ExampleMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20121011141021 extends AbstractMigration
@AndrewDryga
AndrewDryga / mix_test_watch.sh
Last active November 4, 2020 17:27
Watch for file changes and run tests for stale modules
#!/bin/bash
command -v fswatch >/dev/null 2>&1 || { echo >&2 "fswatch is not installed. To install it use 'brew install fswatch'. Aborting."; exit 1; }
command -v mix >/dev/null 2>&1 || { echo >&2 "mix is not installed. Aborting."; exit 1; }
PROJECT_PATH=$(git rev-parse --show-toplevel)
[[ "$?" != "0" ]] && echo "Stale test watch works only within git project." && exit 1;
declare -a IGNORED_PATHS
declare -i throttle_by=2
@tPl0ch
tPl0ch / build.xml
Created December 2, 2012 03:51
Ant build file for PHP projects including Behat build task
<?xml version="1.0" encoding="utf-8"?>
<project name="your-project-name-here" default="build">
<target name="build"
depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit,behat,phpcb"/>
<target name="build-parallel"
depends="prepare,lint,tools-parallel,phpunit,phpcb"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
@havvg
havvg / bdd-experiment-guide.md
Created September 9, 2011 14:44
Behavior Driven Development in Symfony2 with Behat, Mink and Zombie.js
@vukanac
vukanac / gist:9188393
Created February 24, 2014 13:27 — forked from vxnick/gist:380904
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',