Skip to content

Instantly share code, notes, and snippets.

View zabaala's full-sized avatar
🏠
Working from home

Mauricio Rodrigues zabaala

🏠
Working from home
View GitHub Profile
@rodrigopa
rodrigopa / Dockerfile
Created January 17, 2023 15:37
Dockerfile for PHP from Source
FROM alpine:3.16
LABEL maintainer="rodrigopa <rodrigo.pinheiroa@hotmail.com>" version="1.0" license="MIT"
ENV TIMEZONE=${timezone:-"America/Fortaleza"} \
APP_ENV=prod
RUN set -ex && apk update && apk add --no-cache ca-certificates curl wget tar xz tzdata pcre php81 php81-bcmath php81-curl php81-ctype php81-dom php81-fileinfo php81-gd php81-iconv php81-mbstring php81-mysqlnd php81-openssl php81-pdo php81-pdo_mysql php81-pdo_sqlite php81-phar php81-posix php81-redis php81-sockets php81-sodium php81-sysvshm php81-sysvmsg php81-sysvsem php81-simplexml php81-tokenizer php81-zip php81-zlib php81-xml php81-xmlreader php81-xmlwriter php81-pcntl php81-opcache && ln -sf /usr/bin/php81 /usr/bin/php && apk del --purge *-dev && rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php81 && php -v && php -m && echo -e "\033[42;37m B
@zabaala
zabaala / iterm2-solarized.md
Created April 18, 2022 10:04 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@megahirt
megahirt / Docker with XDebug.md
Last active April 9, 2024 11:55
Debugging PHP with XDebug v3 inside Docker using VSCode

Debugging PHP with XDebug v3 inside Docker using VSCode

Assumptions / Prerequisites

  • XDebug v3+ inside Docker (e.g. php:7.3-apache Docker image)
  • Running Docker v20.10+
  • VSCode with PHP Debug Extension (Felix Becker)
  • Using Docker Compose for orchestration

Objective

@antonmedv
antonmedv / DotNotation.php
Last active August 11, 2022 13:47
Dot notation for access multidimensional arrays.
<?php
/**
* Dot notation for access multidimensional arrays.
*
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]);
*
* $value = $dn->get('bar.baz.foo'); // $value == true
*
* $dn->set('bar.baz.foo', false); // ['foo'=>false]
*