Skip to content

Instantly share code, notes, and snippets.

View Tilotiti's full-sized avatar

Thibault Henry Tilotiti

View GitHub Profile
Verifying that "tilotiti.id" is my Blockstack ID. https://onename.com/tilotiti
@Tilotiti
Tilotiti / login.html.twig
Created October 7, 2016 09:41
Symfony - Création d'un espace sécurisé (Views)
{% extends 'base.html.twig' %}
{% block body %}
<h1>Connexion</h1>
{% if error %}
<div class="alert alert-danger">{{ error.message }}</div>
{% endif %}
<form method="post" action="{{ path('login_check') }}" class="form-horizontal col-md-6 col-md-offset-2">
<div class="form-group">
<label class="control-label col-sm-4" id="inputUsername">Nom d'utilisateur</label>
@Tilotiti
Tilotiti / security.yml
Created October 7, 2016 10:40
Symfony - Création d'un espace sécurisé (Config)
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
providers:
in_memory:
memory:
users:
admin:
password: "PASSWORD123"
@Tilotiti
Tilotiti / AdminController.php
Last active October 7, 2016 10:41
Symfony - Création d'un espace sécurisé (Controllers)
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
/**
* Class AdminController
* @package AppBundle\Controller
@Tilotiti
Tilotiti / ZipcodeCommand.php
Created January 3, 2018 10:25
craue/CraueGeoBundle : Import Zipcode Command
<?php
namespace App\Command;
use Craue\GeoBundle\Entity\GeoPostalCode;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@Tilotiti
Tilotiti / gist:7d3516d9c2e956b7b0ee5db0cc5c780b
Last active April 11, 2018 08:51
Bing SpellCheck PHP Exemple
<?php
$host = 'https://api.cognitive.microsoft.com';
$path = '/bing/v7.0/spellcheck?';
$input = "Hollo, wrld!";
$get = [
'mkt' => 'en-US',
'mode' => 'proof'
];
@Tilotiti
Tilotiti / example.php
Created July 10, 2018 08:50
Luminati - Residential single session
<?php
$username = 'lum-customer-****-zone-residential';
$password = '*********';
$port = 22225;
$user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36';
$session = mt_rand();
$super_proxy = 'zproxy.lum-superproxy.io';
$url = 'https://www.domaintocrawl.com/';
$curl = curl_init($url);
@Tilotiti
Tilotiti / map.js
Created October 4, 2018 13:04
Google Map : Join Polygons
// Import JSTS : http://bjornharrtell.github.io/jsts/
// Import Google Map API
var map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.TERRAIN
});
var bound = new google.maps.LatLngBounds();
var paths = [