Skip to content

Instantly share code, notes, and snippets.

View kiironoaki's full-sized avatar
Convert tea to code

Serghei Niculaev kiironoaki

Convert tea to code
View GitHub Profile
@kiironoaki
kiironoaki / SymfonyDeprecationNotices.md
Last active January 21, 2017 03:02
Removing deprecation notices in Symfony using Codeception

Here is the best way to remove deprecation notices in Symfony 2.8 with using Codeception in CLI:

export SYMFONY_DEPRECATIONS_HELPER=weak
@kiironoaki
kiironoaki / dh.php
Created December 1, 2016 16:48
Deffie-Hellman protocol sandbox
<?php
// private
$A = 15; // Alice
echo "Alice private key: " . $A . "(A)\n";
$B = 5; // Bob
echo "Bob private key: " . $B . "(B)\n";
// public
$a = pow(11, $A) % 23; // Alice
echo "\nAlice public key: " . $a . "\n";