Skip to content

Instantly share code, notes, and snippets.

View Taluu's full-sized avatar
🖕
vim is the true editor !

Baptiste Clavié Taluu

🖕
vim is the true editor !
View GitHub Profile
<?php
declare(strict_types=1);
<<<CONFIG
packages:
- "symfony/console": "^4.3"
- "symfony/finder: ^4.3"
- "symfony/filesystem: ^4.3"
- "symfony/yaml": "^4.3"
{
"require": {
"symfony/http-client": "^4.3@dev"
},
"require-dev": {
"symfony/var-dumper": "^4.3@dev"
},
"minimum-stability": "dev"
}
@Taluu
Taluu / composer.json
Created August 30, 2018 19:58
Rename tv shows series through a pattern
{
"require": {
"symfony/finder": "^4.1",
"symfony/console": "^4.1",
"symfony/debug": "^4.1",
"symfony/filesystem": "^4.1"
},
"require-dev": {
"symfony/var-dumper": "^4.1"
},

Keybase proof

I hereby claim:

  • I am taluu on github.
  • I am talus (https://keybase.io/talus) on keybase.
  • I have a public key ASBFwZbM2j9hU39Pv6eKeBb02XXBt4SQ9yjuZdw6QACEEQo

To claim this, I am signing this object:

@Taluu
Taluu / foo.php
Created September 30, 2016 08:36
<?php
// in POST_AUTOLOAD_DUMP
$map = include('autoload_classmap.php');
// TODO lowercase all keys
file_put_contents('autoload_classmap_insentitive.php', '<?php return '.var_export($map, 1));
// at RUNTIME
require 'vendor/autoload.php';
XMLReader {#3
+localName: "root"
+depth: 0
+attributeCount: 0
+hasAttributes: false
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#10 …}
<?php
// snippet
class Processor
{
public function sleep(array $options)
{
if (null === $options['timeout']) {
return $this->processor instanceof SleepyInterface ? $this->processor->sleep($options) : true;
}
@Taluu
Taluu / bench_reflection.php
Created December 25, 2015 20:58
Benching to see how to easily export a whole php object
<?php
class Foo
{
public $foo;
protected $bar;
private $baz;
public function __construct($foo, $bar, $baz)
{
<?php
class Foo implements Serializable
{
public $foo, $bar;
public function serialize()
{
return json_encode(['foo' => $this->foo, 'bar' => $this->bar]);
}

Wording

We will develop an awesome game named Da Movie Quizz, which will will test the cinematographic culture of the player. The main purpose is very simple:

Each round, we suggest an actor and a movie poster. The player must say if the actor has performed in the movie or not.

At the first wrong answer, game over. As long as the player gives a right answer, the game continues.

Simple, basic and fun !

What we expect