Skip to content

Instantly share code, notes, and snippets.

View Moinax's full-sized avatar
🏠
Working from home

Jérôme Poskin Moinax

🏠
Working from home
View GitHub Profile
@Moinax
Moinax / error.json
Last active January 28, 2019 15:22
Provide config for application TMLW
{
"status": "error",
"lives": 3,
"message": ""
}
<?xml version="1.0"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" mediaPresentationDuration="PT22.46S" minBufferTime="PT11.43S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static">
<Period id="0">
<AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
<Representation bandwidth="55448" codecs="mp4a.40.2" id="audio-und">
<BaseURL>https://staging-black.youhaveajack.com/4dbce552-8ecc-4ba8-9f70-5fdff8c0a4c7_d3a2f6938f1e4750743f6574da8427ed/4dbce552-8ecc-4ba8-9f70-5fdff8c0a4c7_d3a2f6938f1e4750743f6574da8427ed-audio-und.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9zdGFnaW5nLWJsYWNrLnlvdWhhdmVhamFjay5jb20vNGRiY2U1NTItOGVjYy00YmE4LTlmNzAtNWZkZmY4YzBhNGM3X2QzYTJmNjkzOGYxZTQ3NTA3NDNmNjU3NGRhODQyN2VkLzRkYmNlNTUyLThlY2MtNGJhOC05ZjcwLTVmZGZmOGMwYTRjN19kM2EyZjY5MzhmMWU0NzUwNzQzZjY1NzRkYTg0MjdlZC1hdWRpby11bmQubXA0KiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTQ2Njg1NTg2MH19fV19&amp;Signature=EwRFxf~sBgtM9DQKUD~CHcjlhyjBPVLvCuriLkcWsAJ-E
@Moinax
Moinax / xdebug_rest.md
Created July 24, 2014 09:13
Activate xdebug in REST client

To activate xdebug from a REST client or in your browser without any plugin

Simply call your url with XDEBUG_SESSION_START= and the name of your key, like PHPSTORM

http://your_api_resource_url?XDEBUG_SESSION_START=PHPSTORM
@Moinax
Moinax / Coupon.php
Created June 23, 2014 16:39
Coupon generation
/**
* @return string
*/
protected function generateCode()
{
$length = 8;
$code = "";
$possible = "2346789234567891234567892345678923456789234567892345678923456789234567892345678923456789abcdfghjkmnpqrtvwxyzABCDFGHJKLMNPQRTVWXYZ";
$maxlength = strlen($possible);
@Moinax
Moinax / README.md
Created April 17, 2014 12:33 — forked from peteboere/README.md
Avoid `console` errors in browsers that lack a console.
@Moinax
Moinax / biggest_directories.sh
Created March 6, 2014 13:37
Locate biggest directory on debian server
# List the 10 biggest directory in the current directory
sudo du -hsx * | sort -rh | head -10
@Moinax
Moinax / ClientController.php
Last active August 29, 2015 13:57
Symfony Form validation through api with common model
<?php
namespace Acme\HelloBundle\Controller;
use Guzzle\Http\Client;
use Guzzle\Http\Exception\BadResponseException;
public function someAction()
{
@Moinax
Moinax / activate xdebug remote phpstorm
Last active December 21, 2015 01:49
Provide a way to connect xdebug through remote server with PHPStorm
export XDEBUG_CONFIG="idekey=PHPSTORM"
@Moinax
Moinax / Remove passphrase
Last active December 20, 2015 15:29
Remove passphrase on ssh key
ssh-keygen -p
@Moinax
Moinax / Flush DNS
Created August 3, 2013 10:15
Flush DNS on Mac OS X
sudo dscacheutil -flushcache