Skip to content

Instantly share code, notes, and snippets.

View alphp's full-sized avatar

Fernando Herrero alphp

View GitHub Profile
@alphp
alphp / ANSI.md
Created June 9, 2023 23:37 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@alphp
alphp / php-8.1-strftime.php
Last active January 28, 2022 00:26 — forked from bohwaz/php-8.1-strftime.php
strftime() replacement function for PHP 8.1
<?php
namespace PHP81_BC;
/**
* Locale-formatted strftime using IntlDateFormatter (PHP 8.1 compatible)
* This provides a cross-platform alternative to strftime() for when it will be removed from PHP.
* Note that output can be slightly different between libc sprintf and this function as it is using ICU.
*
* Usage:
* use function \PHP81_BC\strftime;
@alphp
alphp / Cake Composer.md
Last active June 5, 2020 14:56 — forked from ogrrd/Cake Composer.md
Install Cake 2.x with Composer

Install CakePHP 2.x with Composer

Windows version

Create project folder

mkdir C:\path\to\your\project
cd C:\path\to\your\project

Create composer.json