Skip to content

Instantly share code, notes, and snippets.

View damienalexandre's full-sized avatar
❤️
I̴͍͋ ̶͉͠Ḻ̸̅O̸͈̚V̷̨͒E̸̛ ̵̲̓Ü̷Ṅ̴̩I̴̳͑C̵͉͂O̷̹͗D̸̤̃È̴̪

Damien Alexandre damienalexandre

❤️
I̴͍͋ ̶͉͠Ḻ̸̅O̸͈̚V̷̨͒E̸̛ ̵̲̓Ü̷Ṅ̴̩I̴̳͑C̵͉͂O̷̹͗D̸̤̃È̴̪
View GitHub Profile
@damienalexandre
damienalexandre / README.md
Created October 2, 2026 11:52
Vonets VAP11G (old generation, HW 5.x) — configure from Linux without the Windows tool. Python 3 port of philsmd/vap11g + protocol notes. Fixes the "device seems dead" mystery: it only speaks raw ethertype 0x8888 frames.

Vonets VAP11G (old generation) — configure it from Linux

This documents and scripts the old Vonets VAP11G hardware revision (e.g. HW Ver 5.0.0, Marvell-based, MAC OUI 00:17:13): the ~2011-2012 model with no reset button, no web UI, and no IP stack on its ethernet port.

If you plug one in and see nothing — no ARP, no DHCP, ping fails, no 192.168.254.254 web page — the device is not broken. That is normal behavior for this generation, and it drives people mad. The newer generation (VAP11G-300 etc.) works completely differently (web UI at

@damienalexandre
damienalexandre / CRUDTest.php
Created August 4, 2025 08:54
Test all EasyAdmin CRUD's
<?php
declare(strict_types=1);
namespace App\Tests\Controller\Admin;
use App\Controller\Admin\DashboardController;
use App\Entity\Admin;
use Doctrine\ORM\EntityManagerInterface;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
### Keybase proof
I hereby claim:
* I am damienalexandre on github.
* I am damienalexandre (https://keybase.io/damienalexandre) on keybase.
* I have a public key ASCu143W_WWJX8WQ0pNHfTsGiOywQiwcj9YtZHNOUBAzHAo
To claim this, I am signing this object:
@damienalexandre
damienalexandre / DatabaseSchemaTest.php
Created October 9, 2015 10:17
Test doctrine schema automatically for missing / broken migrations.
<?php
namespace AppBundle\Tests;
use Doctrine\ORM\Tools\SchemaTool;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
/**
* Use Doctrine default entity manager and compare it's metadata to the actual database schema.
*
@damienalexandre
damienalexandre / ProfilerController.php
Created July 5, 2015 15:10
Adding a checkbox on the translation panel + custom save controller
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ProfilerController extends Controller
@damienalexandre
damienalexandre / santa.php
Created October 31, 2014 10:23
Secret Santa matcher with PHP Generator
<?php
/**
* Secret Santa Generator - powered by PHP Generators for the lolz.
*/
$players = [
"xx@jolicode.com",
"spam@jolicode.com",
"nop@jolicode.com",
"foo@jolicode.com",
text: Calendrier de l'Afsy, avec des Bundles indexés.
analyzer:
custom_french_analyzer:
type: custom
tokenizer: letter
filter: ["asciifolding", "lowercase", "french_stem", "stop_fr"]
filter:
stop_fr:
type: "stop"
@damienalexandre
damienalexandre / coucou.sh
Created October 25, 2013 14:55
How to use ElasticSearch / Basic facet query
curl -XDELETE 'http://localhost:9200/pony_index_tmp'
curl -XPUT 'http://localhost:9200/pony_index_tmp' -d '
{
"number_of_shards": 1,
"number_of_replicas": 0
}'
curl -XPUT 'http://localhost:9200/pony_index_tmp/post/_mapping' -d '
curl -XDELETE 'http://localhost:9200/pony_index_tmp'
curl -XPUT 'http://localhost:9200/pony_index_tmp' -d '
{
"number_of_shards": 1,
"number_of_replicas": 0
}'
<?php
use JoliTypo\Fixer;
$fixer = new Fixer(array("FrenchQuotes", "FrenchNoBreakSpace"));
$fixed_content = $fixer->fix('<p>Nous avons "caché" une page Goodies sur <a href="http://jolicode.com/">Jolicode.com</a> !</p>');
// Result: <p>Nous avons &laquo;&nbsp;cach&eacute;&nbsp;&raquo; une page Goodies sur <a href="http://jolicode.com/">Jolicode.com</a>&#8239;!</p>