Skip to content

Instantly share code, notes, and snippets.

@quentint
quentint / lando-phpstorm-intellij-idea-phpunit.md
Last active April 27, 2023 21:18
Lando + PHPStorm/IntelliJ IDEA + PHPUnit

Lando + PHPStorm/IntelliJ IDEA + PHPUnit

Context

This gist is a follow-up to this Lando issue, updated for Docker Composer and Windows (but might also help macOS and Linux users).

Steps

Setup Docker

@quentint
quentint / Kernel.php
Last active May 5, 2021 14:47 — forked from carteni/AppBundle.php
[Twig] Refreshing modified Templates when OPcache or APC is enabled.
<?php
/**
* @file src/Kernel.php
*/
<?php
namespace App;
@quentint
quentint / symfony-new-specifying-php-exe.cmd
Last active November 26, 2019 08:20
Install Symfony specifying which PHP executable/version to use
C:\xampp-7.3.3\php\php.exe C:\ProgramData\ComposerSetup\bin\composer.phar create-project symfony/website-skeleton my_project_name
@quentint
quentint / har-extract.js
Last active December 12, 2017 11:21 — forked from amishshah/har-extract.js
Rough script to extract files from HTTP Archive (HAR) files
const fs = require('fs');
const file = JSON.parse(fs.readFileSync('./my-file.har')).log;
const targetMimeType = 'application/font-woff';
let count = 0;
for (const entry of file.entries) {
if (entry.response.content.mimeType === targetMimeType) {
let fileName = entry.request.url.split('/').pop();
// Ensure output directory exists before running!
fs.writeFileSync(`./output/${fileName}`, new Buffer(entry.response.content.text, 'base64'), 'binary');
/*
* POINT3D CLASS Copyright (c) Brandon Williams - 3/3/2001 - ahab@houston.rr.com - use freely with accreditation.
*
*
* CONSTRUCTOR: point3d (px, py, pz, pcx, pcy, MC, psize, D)
*
* -- creates a new 3d point (can be used for 2d by making pz=0). The arguements "px", "py",
* and "pz" is the point's ordered triplet (x,y,z). Arguements "pcx" and "pcy" is where on
* the stage you want the origin to be. Since (0,0) on a computer screen is in the top left
* hand corner those variables are used to center the point's rotations/movements. This way
@quentint
quentint / SassMeister-input.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$couleur-bandeau: (fr: blue, en: red, es: #f0f);
@mixin lang-color($prop, $color-name) {
@each $lang, $val in $color-name {
#{'.lang-' + $lang} & {
@quentint
quentint / dabblet.css
Created June 30, 2014 07:23
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@quentint
quentint / dabblet.css
Created June 28, 2014 17:21
Gros caca kilométrique
/**
* Gros caca kilométrique
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@quentint
quentint / Entity.php
Last active August 29, 2015 13:59
SonataAdminBundle sonata_type_collection entity relations
class Entity {
/**
* @var ArrayCollection
* @ORM\OneToMany(
* targetEntity="PlaceThemePresence",
* mappedBy="place",
* cascade={"persist"},
* orphanRemoval=true
* )
@quentint
quentint / dabblet.css
Created May 7, 2013 15:38
Basel;ne fixes
/**
* Basel;ne fixes
*/