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 / 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 / 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
@DannyQuah
DannyQuah / 2020.08-D.Quah-Pandoc-Workflow-Markdown-PDF.md
Last active April 8, 2024 12:57
My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical Writing

My Pandoc Markdown-PDF Workflow for Routine, Not Especially Technical, Writing

by Danny Quah, Aug 2020 (revised Jan 2022)

TL;DR: I write technical articles in LaTeX. But shorter, non-technical writings are easier to do in Markdown. How do I produce PDF from Markdown documents? Answer: provide YAML information in the Markdown; run Pandoc (typically through a Makefile or Atom's Markdown Preview Enhanced). To make all this work, some adjustment is needed in Pandoc options and template files.

Pandoc is a filter that takes a written document in a particular format, and produces a version of that same document in yet a different format. I use Pandoc primarily to transform Markdown documents to PDF, but I also draw on Pandoc to convert Word or ODT documents to Markdown. And vice versa.

Available official Pandoc documentation is voluminous. So as a matter of logic the knowledge to generate PDF from Markdown, to the user's desired degree of control, is already extant, out there somewhere. But a user j

@josantonius
josantonius / language-codes.json
Last active May 20, 2024 08:59
List of 217 language codes (ISO 639-1)
{
"aa": "Afar",
"ab": "Abkhazian",
"ae": "Avestan",
"af": "Afrikaans",
"ak": "Akan",
"am": "Amharic",
"an": "Aragonese",
"ar-ae": "Arabic (U.A.E.)",
"ar-bh": "Arabic (Bahrain)",
@ivanvermeyen
ivanvermeyen / !NOTE.md
Last active March 15, 2023 05:25
Setup a Laravel Storage driver with Google Drive API
@josue
josue / pdf-conversion-fun.md
Last active December 10, 2023 15:11
Using ImageMagick to easily: Split, Merge, Remove a page from PDF.

Install Required libraries:

sudo apt-get update && sudo apt-get install imagemagick gs

create directory to test commands

mkdir -p pdf_conversion/{merged,split}
cd pdf_conversion
@sighingnow
sighingnow / Makefile
Last active April 28, 2024 10:42
Detect operating system in Makefile.
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif