Standard escape codes are prefixed with Escape:
- Ctrl-Key: ^[
- Octal: \033
- Unicode: \u001b
- Hexadecimal: \x1B
- Decimal: 27
| const options = { year: "numeric", month: "long", day: "numeric" }; | |
| const date = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z | |
| console.log(date.toLocaleDateString("pt-br", options)) | |
| // 31 de dezembro de 2020 | |
| console.log(date.toLocaleDateString("pt-br", { ...options, month: 'numeric'})) | |
| // 31/12/2020 | |
| const regex = /^([0-9]{4})[-](0[1-9]|1[0-2])[-](0[0-9]|1[0-9]|2[0-9]|3[0-1])/gm | |
| const dateRx = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z | 
| deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse | 
| /** | |
| * Here is the jdk8 datetime cheatsheet and explanation why we use ZonedDateTime and Instant in TimeService. | |
| */ | |
| // this is the 01.03.2016 00:00 in server timezone (Europe/Warsaw) == EXACTLY THE SAME AS THE SYSTEM TIME | |
| ZonedDateTime zonedDateTime = ZonedDateTime.of(2016, 3, 1, 0, 0, 0, 0, ZoneId.systemDefault()); | |
| System.out.println(zonedDateTime); // 2016-03-01T00:00+01:00[Europe/Warsaw] | |
| // this is the same 01.03.2016 00:00 but doesn't carry timezone information | |
| LocalDateTime localDateTime = zonedDateTime.toLocalDateTime(); | 
| <script src="zoologicMonitor.js"></script> | |
| <script lang="javascript"> | |
| const dog = makeDog( | |
| { | |
| name:"Laio", | |
| id: 1, | |
| } | |
| ); | |
| dog.walk() | |
Only add the xdebug.remote_log line if you need to troubleshoot.
FROM php:7.1-apache
RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
Debug Modern JavaScript with VSCode. Part of VSCode Course.
npm init -yApesar de Roy Fielding deixar bastante claro que para uma API ser considerada RESTful ela precisa obrigatoriamente seguir todas as constraints definidas em seu trabalho, na prática, muitas vezes precisamos de uma abordagem um pouco mais simples.
Sendo assim, Leonard Richardson propôs um modelo de 4 níveis para que alcancemos uma API REST.
Os níveis 0, 1 e 2 talvez sejam mais familiares, e de fato são mais fáceis de implementar, porém, deve ficar claro que os mesmos não são considerados RESTful.
| // Ansi colors in Groovy | |
| // Author: Ted Vinke | |
| import static Ansi.* | |
| println color("BOLD", Ansi.BOLD) | |
| println color("ITALIC", Ansi.ITALIC) | |
| println color("UNDERLINE", Ansi.UNDERLINE) | |
| println color("BLINK", Ansi.BLINK) | |
| println color("RAPID_BLINK", Ansi.RAPID_BLINK) | |
| println color("REVERSE_VIDEO", Ansi.REVERSE_VIDEO) |