Skip to content

Instantly share code, notes, and snippets.

@Tilotiti
Tilotiti / map.js
Created Oct 4, 2018
Google Map : Join Polygons
View map.js
// 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 = [
@Tilotiti
Tilotiti / example.php
Created Jul 10, 2018
Luminati - Residential single session
View example.php
<?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);
View gist:7d3516d9c2e956b7b0ee5db0cc5c780b
<?php
$host = 'https://api.cognitive.microsoft.com';
$path = '/bing/v7.0/spellcheck?';
$input = "Hollo, wrld!";
$get = [
'mkt' => 'en-US',
'mode' => 'proof'
];
@Tilotiti
Tilotiti / ZipcodeCommand.php
Created Jan 3, 2018
craue/CraueGeoBundle : Import Zipcode Command
View ZipcodeCommand.php
<?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 / security.yml
Created Oct 7, 2016
Symfony - Création d'un espace sécurisé (Config)
View security.yml
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
providers:
in_memory:
memory:
users:
admin:
password: "PASSWORD123"
@Tilotiti
Tilotiti / login.html.twig
Created Oct 7, 2016
Symfony - Création d'un espace sécurisé (Views)
View login.html.twig
{% 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 / AdminController.php
Last active Oct 7, 2016
Symfony - Création d'un espace sécurisé (Controllers)
View AdminController.php
<?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
View gist:e81118eda67530c2c86a524bb2c9d929
Verifying that "tilotiti.id" is my Blockstack ID. https://onename.com/tilotiti
You can’t perform that action at this time.