Skip to content

Instantly share code, notes, and snippets.

View shulard's full-sized avatar
Working from anywhere…

Stéphane HULARD shulard

Working from anywhere…
View GitHub Profile
shulard / DynamicKernelResolution.php
Last active January 30, 2020 08:00
Define dynamic kernel for a specific test case !
<?php declare(strict_types=1);
namespace App\Tests\Features\SynchronousJob;
use App\Tests\Features\SynchronousTestCase;
use App\Tests\Features\SynchronousTestKernel;
class PushJobWithRetryOnTaskFailTest extends SynchronousTestCase
protected static function createKernel(array $options = [])
shulard / hote.js
Created December 27, 2016 09:33
Utilisation de l'API window.postMessage pour communiquer avec une iFrame...
var callback = function(event) {
//Protection contre le hack, on n'autorise que les event venant de la frame cible
var origin = event.origin || event.originalEvent.origin;
if (origin !== '') {
if ( === 'tonmessage') {
//Ici tu peux déclencher ton tracker
shulard / .gitignore
Last active October 14, 2016 15:36
Melody script which help to identify who is current UserAgent in a webserver visit :
shulard / example.php
Last active January 12, 2018 04:15
WordPress: SQL Query to retrieve results when meta_key like `modules%_module` and meta_value as a given value...
global $wpdb;
$myid = 157;
$views = $wpdb->get_results($wpdb->prepare(
FROM `wp_posts` as p
LEFT JOIN `wp_postmeta` as m ON p.ID=m.post_id
WHERE m.meta_id IN (
SELECT meta_id FROM wp_postmeta
shulard / disclaimer.xml
Last active May 2, 2016 14:07
How to use the `xi:include` tag in XML files...
<?xml version='1.0'?>
<p>The opinions represented herein represent those of the individual
and should not be interpreted as official policy endorsed by this
shulard /
Last active March 3, 2020 14:05
Script d'installation et configuration de DNSMasq sur Mac OS pour rediriger tous les .localhost vers
#Installation avec Homebrew
brew update
brew install dnsmasq
#Mise en place de la configuration et ajout des règle
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf
sed -i '' -e "/\#address=\/double-click\.net\/127\.0\.0\.1/a\\
address=/.localhost/" /usr/local/etc/dnsmasq.conf
#Démarrage du daemon
shulard /
Created February 11, 2016 16:46 — forked from floptwo/

PHP-CLI (PHP en ligne de commande) sur les hébergements mutualisés OVH


/usr/local/php5.3/bin/php  =>  PHP 5.3.29 (cli) (built: Dec 10 2014 16:59:41)
/usr/local/php5.4/bin/php  =>  PHP 5.4.38 (cli) (built: Feb 26 2015 09:53:00)
/usr/local/php5.5/bin/php  =>  PHP 5.5.22 (cli) (built: Feb 23 2015 13:12:45)
/usr/local/php5.6/bin/php  =>  PHP 5.6.6 (cli) (built: Feb 23 2015 13:13:02)
/usr/local/php7.0/bin/php =&gt; PHP 7.0.0 (cli) (built: Dec 4 2015 11:04:38) ( NTS )
shulard / .atoum.php
Last active January 21, 2016 16:59
Atoum Configuration
Verifying that +shulard is my blockchain ID.
shulard / login.feature
Last active November 12, 2015 08:48
Behat sample features
Feature: Login
In order to use my application
As a website user
I need to be logged
Scenario: Try to log as a valid user
Given I am authenticated as "admin"
Then I should be on "/sites"
Scenario: Try to log with invalid credentials