Skip to content

Instantly share code, notes, and snippets.

View tristanbes's full-sized avatar

Tristan Bessoussa tristanbes

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

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 July 27, 2023 19:12
PHPUnit functional test to check if migrations inside a Symfony app
<?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 April 11, 2021 17:24
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/macos/

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
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active May 3, 2024 10:55
tmux Cheat Sheet
@mickaelandrieu
mickaelandrieu / upgrade_to_symfony3-lts.md
Last active March 20, 2024 20:16
Migration guide to Symfony 3 LTS

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 October 2, 2018 11:57
Convert NelmioApiDocBundle annotations to Swagger PHP

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 10:23 — forked from JJK801/pre-commit.sh
Git Pre-Commit hook for coding standards validation
#!/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 February 6, 2015 13:33
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)
<?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 August 29, 2015 14:10
Injecting Symfony services into Behat PageObjects
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 August 29, 2015 13:55
PHP setter/getter snippet for sublime text
<snippet>
<content><![CDATA[
/**
* Set ${1:property}
*
* @param ${2:type} \$$1
*
* @return ${3:Type}
*/
public function set${1/^([a-z])/\u$1/g}(\$$1)