Skip to content

Instantly share code, notes, and snippets.

View Nek-'s full-sized avatar
:octocat:

Maxime Veber Nek-

:octocat:
View GitHub Profile
@Nek-
Nek- / Dockerfile
Last active January 30, 2019 10:41
Docker in docker
FROM docker:dind
RUN apk update && apk add --no-cache py-pip && apk add --no-cache bash
RUN pip install docker-compose
COPY . /project
WORKDIR /project
COPY docker/scaan/entrypoint.sh /entrypoint.sh
declare module "phaser-ce" {
export = Phaser;
}
declare class Phaser {
static VERSION: string;
static DEV_VERSION: string;
static GAMES: Phaser.Game[];
}
@Nek-
Nek- / README.md
Last active June 4, 2018 18:49
Box2D TypeScript benchmark
@Nek-
Nek- / PreviousWorkflowTransitionCompilerPass.php
Created May 18, 2018 15:36
Add mirror previous transitions
<?php
namespace App\Application\Symfony\CompilerPass;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\Workflow;
class PreviousWorkflowTransitionCompilerPass implements CompilerPassInterface
@Nek-
Nek- / SymfonyFormTransformer.php
Last active March 6, 2018 16:11 — forked from ostrolucky/SymfonyFormTransformer.php
Convert Symfony Form to text values
<?php
/**
* @param FormInterface $form
* @return string
*/
private function transformFormToText(FormInterface $form)
{
$txt = '';
foreach ($form->getData() as $inputName => $inputValue) {
$formElement = $form->get($inputName);
@Nek-
Nek- / main.ts
Created September 25, 2017 19:16
PixiJS & TypeScript & Webpack 3.5
import * as PIXI from 'pixi.js';
document.addEventListener('DOMContentLoaded', () => {
let renderer = PIXI.autoDetectRenderer(
600,
400,
{antialias: true, transparent: false, resolution: 1, backgroundColor: 0xFFFFFF}
);
}, false);
@Nek-
Nek- / DoctrineExtensionTimestampableInterface.php
Created August 14, 2017 09:32
How to use timestampable entities with api-platform / symfony serializer
<?php
namespace AppBundle\Entity\Doctrine;
interface DoctrineExtensionTimestampableInterface
{
/**
* @return \DateTime
*/
public function getCreatedAt();
@Nek-
Nek- / main.ts
Created February 26, 2016 23:30
Angular with jspm, typescript and systempm (beta7)
// Inside app/main.ts
import 'zone.js';
import 'reflect-metadata';
import {bootstrap} from 'angular2/platform/browser'
import {AppComponent} from './app.component'
bootstrap(AppComponent);
<?php
namespace ServicePlus\CoreBundle\Service;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityNotFoundException;
use ServicePlus\CoreBundle\Entity\Company;
use ServicePlus\CoreBundle\Entity\Device;
use ServicePlus\CoreBundle\Entity\Report;
use Symfony\Component\EventDispatcher\EventDispatcher;

Récap sur le iceframework et les tools qui vont autour

ICE est le protocole de synchronisation utilisé par WebRTC (en VoIP). ( https://www.wikiwand.com/en/Interactive_Connectivity_Establishment ) Il est associé aux protocoles stun et turn.

L’objet RtcPeerConnection a besoin d’un objet RTCConfiguration qui se configure en spécifiant un (ou plusieurs) serveur stun/turn.

L’outil suivant permet de monter un serveur stun & turn : https://github.com/coturn/coturn (une image coturn est dispo sur AWS apparemment)