Skip to content

Instantly share code, notes, and snippets.

Avatar

Tristan Bessoussa tristanbes

View GitHub Profile
@ckelner
ckelner / README.md
Last active Oct 5, 2020
Using the Datadog Ansible integration with Ansible Tower
View README.md

Datadog and Ansible Tower

This doc explains the nuances of using the Datadog Ansible Integration with Ansible Tower.

Ansible Setup

In a directory of your choosing, run the following commands:

  • vagrant init ansible/tower
  • vagrant up --provider virtualbox
  • vagrant ssh
@lsmith77
lsmith77 / DoctrineMigrationTest.php
Last active Jan 27, 2020
PHPUnit functional test to check if migrations inside a Symfony app
View DoctrineMigrationTest.php
<?php
namespace AppBundle\Tests;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\DBAL\Driver\PDOMysql\Driver as MySQLDriver;
class DoctrineMigrationTest extends WebTestCase
{
@DirtyF
DirtyF / README.md
Last active Apr 16, 2020
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/macos/
View README.md

First, make sure you have command line tools installed:

xcode-select --install

Then open Terminal.app and type:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/fbc736fa1b50bd637929a315e6803df306c8bc8e/setup-rbenv.sh | bash
@mickaelandrieu
mickaelandrieu / upgrade_to_symfony3-lts.md
Last active Nov 19, 2020
Migration guide to Symfony 3 LTS
View upgrade_to_symfony3-lts.md

Let's migrate a Symfony 2.8 LTS application to Symfony 3 LTS

Handle deprecations

First of all, ensure you don't have any deprecated!

The Symfony documentation explains it well, but let's sum up:

  • install the phpunit bridge ($ composer require --dev symfony/phpunit-bridge)
  • also check all your pages using web profiler and be ensure there is no deprecation error handled
  • found errors and need help about how to fix it ? I did a sort of guide.
@dbu
dbu / README.md
Last active Oct 2, 2018
Convert NelmioApiDocBundle annotations to Swagger PHP
View README.md

A Symfony command to convert from NelmioApiDocBundle annotations to Swagger-PHP annotations.

This code is provided as is. Make sure to have your code committed to version control before running the command. Check if things work out and if not, use version control to reset the automated changes and fix the command.

@KuiKui
KuiKui / pre-commit.sh
Last active May 26, 2016 — forked from JJK801/pre-commit.sh
Git Pre-Commit hook for coding standards validation
View pre-commit.sh
#!/bin/bash
#--------------------------------------------------------------------------------------------------
# WARNING : due to a 'git stash save -u' command, check your .gitignore file before using this hook
# -> http://blog.icefusion.co.uk/git-stash-can-delete-ignored-files-git-stash-u/
#--------------------------------------------------------------------------------------------------
binary="coke"
file=".coke"
files=""
@tentacode
tentacode / ScreenshotContext.php
Created Feb 6, 2015
After a Behat javascript scenario fails, taking a screenshot then sending it to wsend as an anonymous user. (could be improved, juste a POC really)
View ScreenshotContext.php
<?php
namespace Context;
use Behat\MinkExtension\Context\RawMinkContext;
use Behat\Testwork\Tester\Result\TestResult;
use Behat\Mink\Driver\Selenium2Driver;
class ScreenshotContext extends RawMinkContext
{
@gggeek
gggeek / BasePage.php
Last active Aug 29, 2015
Injecting Symfony services into Behat PageObjects
View BasePage.php
namespace Kaliop\AProject\PageObjects\Pages;
use SensioLabs\Behat\PageObjectExtension\PageObject\Page;
use Behat\Mink\Session;
use SensioLabs\Behat\PageObjectExtension\PageObject\Factory;
abstract class BasePage extends Page
{
protected $aService;
@devster
devster / php_setget.sublime-snippet
Last active Aug 29, 2015
PHP setter/getter snippet for sublime text
View php_setget.sublime-snippet
<snippet>
<content><![CDATA[
/**
* Set ${1:property}
*
* @param ${2:type} \$$1
*
* @return ${3:Type}
*/
public function set${1/^([a-z])/\u$1/g}(\$$1)
You can’t perform that action at this time.