Skip to content

Instantly share code, notes, and snippets.

@matheusb-comp
matheusb-comp / README.md
Last active January 29, 2021 22:56
Funcionamento orkestral/venom

WAPI Parasite (orkestral/venom)

A biblioteca define uma série de módulos para buscar dentro da variável window['webpackJsonp'], que é o output do Webpack.

Screenshot from 2021-01-29 18-50-38

A cada 100ms o código

@matheusb-comp
matheusb-comp / php-wrapper
Created April 28, 2021 22:43
PHP wrapper to load libreadline at runtime
#!/bin/sh
# PHP installed in AWS EC2 using Amazon-Linux-Extras is compiled with:
# --without-readline --with-libedit
#
# However, for some reason, libedit doesn't accept UTF-8 input:
# https://github.com/bobthecow/psysh/issues/148
#
# Instead of building PHP from the source code, apparently libreadline
# can just be preloaded when running PHP:
@matheusb-comp
matheusb-comp / merge_url_query.php
Created October 6, 2023 17:20
Parse and rebuild an URL adding new QueryString values
<?php
function mergeUrlQuery(string $url, array $queryData = []): string
{
$parts = parse_url($url);
if (empty($parts['host'])) throw new \InvalidArgumentException('url');
$originalQuery = [];
if (!empty($parts['query'])) {
foreach (explode('&', $parts['query']) as $i => $el) {
@matheusb-comp
matheusb-comp / pix_formats.md
Created July 17, 2024 17:04
Exemplos de formato PIX

Formatos PIX

Exemplos da string PIX (geralmente representada por um QR Code), identificando os campos.

Cada campo tem o formato <ID> <tamanho> <valor>.

Mais detalhes no Manual de Padrões.

PIX Estático (seção 6.1)

00 02 01 // Payload format (fixo)