Skip to content

Instantly share code, notes, and snippets.

View gmorel's full-sized avatar
🌱

Guillaume MOREL gmorel

🌱
View GitHub Profile
@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.

@btroncone
btroncone / ngrxintro.md
Last active May 18, 2025 04:12
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@subfuzion
subfuzion / curl.md
Last active June 8, 2025 06:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@niels-nijens
niels-nijens / .travis.yml
Last active November 24, 2017 13:32
Running Apache2 and PHP-FPM in Travis CI container-based infrastructure
addons:
apt:
packages:
- apache2
- libapache2-mod-fastcgi
install:
- echo "Initializing Apache2 and PHP-FPM"
- cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
@parmentf
parmentf / GitCommitEmoji.md
Last active June 6, 2025 16:10
Git Commit message Emoji
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active June 7, 2025 03:48
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@stof
stof / FeatureContext.php
Created December 29, 2014 08:44
Accessing other contexts in Behat 3
<?php
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
class FeatureContext implements Context {
private $subContext;
/** @BeforeScenario */
public function gatherContexts(BeforeScenarioScope $scope)
@clhenrick
clhenrick / README.md
Last active March 3, 2025 23:02
PostgreSQL & PostGIS cheatsheet (a work in progress)
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 7, 2025 17:02
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@jakzal
jakzal / AuthenticationContext.php
Last active May 2, 2022 10:18
Logging user into a Symfony app in Behat
<?php
namespace Acme\Context;
use Acme\MyApp\User;
use Behat\MinkExtension\Context\RawMinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Doctrine\ORM\EntityManager;
use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken;
use Symfony\Component\HttpKernel\KernelInterface;