Skip to content

Instantly share code, notes, and snippets.

View ewilan-riviere's full-sized avatar
🦄

Ewilan Rivière ewilan-riviere

🦄
View GitHub Profile
@ewilan-riviere
ewilan-riviere / rust-setup.md
Last active April 28, 2024 08:36
How to install Rust
@ewilan-riviere
ewilan-riviere / php-array-object-typed.md
Created November 22, 2023 08:00
PHP array|object typed on VSCode.

PHP array|object typed on VSCode.

With vscode-intelephense extension (1.10.0 - 2023-11-05).

Array/Object shapes via annotations

/** @param array{foo:string, bar:int} $arrayShape */ or /** @return object{foo:string, bar:int} */

Improved type inference

@ewilan-riviere
ewilan-riviere / tsconfig.json
Created September 29, 2023 05:32
Laravel with Vite and TypeScript: tsconfig.json example
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
@ewilan-riviere
ewilan-riviere / ClientPost.php
Created July 25, 2023 11:28
PHP example to send HTTP Post with cURL, Stream or Guzzle.
<?php
namespace Kiwilan\Sentinel;
use Exception;
class ClientPost
{
protected function __construct(
readonly protected string $host,

Flutter

Flutter is an open-source UI software development kit created by Google. It is used to develop cross platform applications from a single codebase for any web browser, Fuchsia, Android, iOS, Linux, macOS, and Windows. First described in 2015, Flutter was released in May 2017.

See official Flutter website for more information.

macOS

Official guide: Install on macOS

@ewilan-riviere
ewilan-riviere / UploadFile.php
Last active February 5, 2024 18:31
Upload file Blade component for Laravel with FilePond, ready for Livewire.
<?php
namespace App\View\Components\Field;
use Illuminate\View\Component;
use Illuminate\View\View;
class UploadFile extends Component
{
public function __construct(
@ewilan-riviere
ewilan-riviere / php-install-imagick-rar-pcov-windows.md
Last active March 8, 2024 10:03
PHP: install `imagick`, `rar`, `pcov`
@ewilan-riviere
ewilan-riviere / php-8.2.ini
Last active March 29, 2023 13:04
INI for PHP 8.2
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@ewilan-riviere
ewilan-riviere / install-p7zip.md
Last active March 29, 2023 13:00
Install `p7zip`.

Install p7zip

p7zip is command line port of 7-Zip for POSIX systems, including Linux.

Linux (Debian like)

apt install -y p7zip
@ewilan-riviere
ewilan-riviere / php-install-extensions.md
Last active April 18, 2024 21:51
PHP: install swoole, pcov, redis, imagick, rar, sqlsrv