Skip to content

Instantly share code, notes, and snippets.

View clemherreman's full-sized avatar

Clement Herreman clemherreman

  • Exotec
  • Lille, France
View GitHub Profile
@clemherreman
clemherreman / file.css
Created August 5, 2011 14:32
Minified CSS example
.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px,1px,1px,1px);}.ui-helper-reset{border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;margin:0;padding:0;}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}* html .ui-helper-clearfix{height:1%;}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}.ui-state-disabled{cursor:default!important;}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#aaa url(images/ui-bg_highlight-hard_40_aaaaaa_1x100.png) 50% top repeat-x;opacity:.30;filter:Alpha(Opacity=30);}.ui-widget{font-family:Verdana, Arial, sans-serif;font-size:1.1em;}.ui-widget .ui-widget{font-size:1em;}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget
@clemherreman
clemherreman / CartSku.php
Created July 1, 2020 12:03
API Platform itemOperation with multiple identifiers
<?php
namespace App\Doctrine\Entity;
use ApiPlatform\Core\Action\NotFoundAction;
use ApiPlatform\Core\Action\PlaceholderAction;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Coupon\Model\OrderSkuInterface;
use App\Doctrine\Validator\Constraints\CartSkuLoyalty;
@clemherreman
clemherreman / CreditNote.php
Created February 20, 2020 16:31
APIP single table inheritance
<?php
/**
* @ORM\Entity
*
* @ApiResource(
* normalizationContext={"groups"={"creditNote:read"}},
* collectionOperations={
* "get"={"controller"=NotFoundAction::class}
* },
* itemOperations={
@clemherreman
clemherreman / gist:0079334759272518f9d3
Last active October 8, 2019 13:09
CLI xdebug distant VM
alias phpdebug='PHP_IDE_CONFIG="serverName=website.dev" XDEBUG_CONFIG="idekey=PHPSTORM" php -d xdebug.remote_host=10.0.2.2 -d xdebug.remote_connect_back=0'
https://www.codingame.com/evaluate/?target=clogin&id=2794381f2ab72d52aa23b4546f45454a7d533f2
@clemherreman
clemherreman / script.js
Created September 18, 2012 09:58 — forked from ClementDuez/script.js
Adding an event handler to an already initialized jQuery UI datepicker
// Adds an event handler
$('#my_datepickerized_field').datepicker( 'option' , 'onSelect', function (date) { // 'onSelect' here, but could be any datepicker event
$(this).change(); // Lauch the "change" evenet of the <input> everytime someone click a new date
});
@clemherreman
clemherreman / docker-https.md
Created January 22, 2018 10:39 — forked from zalexki/docker-https.md
Docker Apache2.4 HTTPS

Open port 443 on container, with a docker-compose file just add :

ports:
  - 443:443

Add virtualhost config :

Listen 443 https
  
@clemherreman
clemherreman / config.yml
Last active June 19, 2017 21:18
Yan hanging on Circle20 :(
version: 2
jobs:
build:
docker:
- image: clemherreman/aif-ci:0.0.2
- image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: root
@clemherreman
clemherreman / install.sh
Created February 20, 2012 13:17
How to: install nodeJS on debian Squeeze, via @sekati
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev
git clone https://github.com/joyent/node.git
cd node
# 'git tag' shows all available versions: select the latest stable.
git checkout enter-a-version
# Configure seems not to find libssl by default so we give it an explicit pointer.
# Optionally: you can isolate node by adding --prefix=/opt/node
@clemherreman
clemherreman / output
Last active December 31, 2015 19:59
WTFred
clemherreman@macclem ~ $ php -v
PHP 5.4.3 (cli) (built: Jun 6 2012 11:03:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
clemherreman@macclem ~ $ php test.php
Content:
.container_home .crm .bd_e{foo) repeat-x