Skip to content

Instantly share code, notes, and snippets.

View lookyman's full-sized avatar

Lukáš Unger lookyman

View GitHub Profile
@Jibbarth
Jibbarth / 1.PHP_OAuth_CLI.md
Last active April 22, 2024 23:34
⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

Github recently released a CLI tool to manage issues and PR directly from your terminal. As I work on some open source projects, I downloaded it to give a try.

And at first launch, the CLI ask to connect by using OAuth. It propose to press "Enter" to open github.com in my browser, and catch correctly the access_token.

That .. blown my mind 🤯 I didn't expect we can connect through terminal like this. So, as it's open source, I dived into the code source.

@paragonie-scott
paragonie-scott / Trololol.php
Last active May 4, 2017 11:38
The Trolololol Design Pattern
<?php
declare(strict_types=1);
class Foo
{
/**
* Even if the code that calls isn't using strict_types, it will still TypeError
* if the wrong type is passed.
*/
public function bar($param, $secondParam)