Skip to content

Instantly share code, notes, and snippets.

View pgrimaud's full-sized avatar
:shipit:
BORED AS FUCK

Pierre Grimaud pgrimaud

:shipit:
BORED AS FUCK
View GitHub Profile
@pgrimaud
pgrimaud / pdo.php
Created June 16, 2019 21:14
pdo.php
<?php
$pdo = new PDO('mysql:host=iim_mysql', 'root', 'root');
$databases = $pdo->query('SHOW DATABASES')->fetch(PDO::FETCH_ASSOC);
print_r($databases);
@pgrimaud
pgrimaud / httpd-vhosts.conf
Created June 16, 2019 21:10
config/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/usr/local/apache2/htdocs"
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://iim_php:9000/var/www/html/$1
</VirtualHost>
@pgrimaud
pgrimaud / request_2.xml
Created June 2, 2019 15:58
RATP - Request stations R
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:ns2="http://wsiv.ratp.fr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns2:getStations>
<ns2:station>
<ns1:direction>
<ns1:line xsi:nil="true" />
<ns1:name xsi:nil="true" />
<ns1:sens>R</ns1:sens>
<ns1:stationsEndLine xsi:nil="true" />
@pgrimaud
pgrimaud / response_2.xml
Created June 2, 2019 15:57
RATP - Response stations R
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:getStationsResponse xmlns:ns2="http://wsiv.ratp.fr">
<ns2:return>
<ns1:ambiguityMessage xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
<ns1:ambiguousLines xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
<argumentDirection xmlns="http://wsiv.ratp.fr/xsd">
<line>
<code>8</code>
@pgrimaud
pgrimaud / response_1.xml
Created June 2, 2019 15:55
RATP - Response stations A
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:getStationsResponse xmlns:ns2="http://wsiv.ratp.fr">
<ns2:return>
<ns1:ambiguityMessage xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
<ns1:ambiguousLines xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
<argumentDirection xmlns="http://wsiv.ratp.fr/xsd">
<line>
<code>8</code>
@pgrimaud
pgrimaud / request_1.xml
Created June 2, 2019 15:53
RATP - Request stations A
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://wsiv.ratp.fr/xsd" xmlns:ns2="http://wsiv.ratp.fr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns2:getStations>
<ns2:station>
<ns1:direction>
<ns1:line xsi:nil="true" />
<ns1:name xsi:nil="true" />
<ns1:sens>A</ns1:sens>
<ns1:stationsEndLine xsi:nil="true" />
@pgrimaud
pgrimaud / ProductMutation.php
Created March 19, 2019 04:04
ProductMutation.php
<?php
namespace App\Mutation;
use App\Entity\Category;
use Doctrine\ORM\EntityManagerInterface;
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
use Overblog\GraphQLBundle\Definition\Resolver\MutationInterface;
use App\Entity\Product;
@pgrimaud
pgrimaud / Kernel.php
Created February 20, 2019 11:04
Kernel.php
public function getCacheDir()
{
if ($this->environment === 'prod') {
return sys_get_temp_dir();
}
return $this->getProjectDir() . '/var/cache/' . $this->environment;
}
public function getLogDir()
{
@pgrimaud
pgrimaud / index.html.twig
Created January 14, 2019 01:53
index.html.twig
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="{{ asset('images/icons/favicon.png') }}"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}">
@pgrimaud
pgrimaud / karma.conf.js
Created January 9, 2019 00:16
karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),