Skip to content

Instantly share code, notes, and snippets.

@marcuspmd
marcuspmd / helpers.sh
Last active September 30, 2025 12:23
Helpers de terminal - Marcus
# Crie a pasta scripts no user
# mkdir -p ~/.scripts
# Carrega helpers personalizados
# Adicione no ~/.zshrc ou ~/.bashrc
# [ -f "$HOME/.scripts/helpers.sh" ] && source "$HOME/.scripts/helpers.sh"
# -----------------------
@marcuspmd
marcuspmd / .php-cs-fixer.php
Created July 18, 2024 12:50
config cs fixer para phalconphp
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
import 'package:flutter/material.dart';
class Distance {
final String name;
final double toMeters;
final double toTransform;
}
class ConvertDistance extends StatefulWidget {
const ConvertDistance({super.key});
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
SELECT
u.id,
u.name,
a.type,
a.street
FROM
users as u,
Lateral (
SELECT
address.type,
SELECT
u.id,
u.name,
(select a.type from address as a where a.user_id = u.id limit 1 order by id asc) as type,
(select a.street from address as a where a.user_id = u.id limit 1 order by id asc) as street
FROM
users as u
SELECT
u.id,
u.name,
a.type,
a.street
FROM
users as u
JOIN address as a on a.user_id = u.id
@marcuspmd
marcuspmd / table_user.csv
Created September 21, 2022 15:51
Table User Medium
id name
1 Marcus
2 Carlos
3 João
4 Maria
@marcuspmd
marcuspmd / php-docker-ext
Created July 25, 2022 01:40 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4
sudo apt install php7.4-common php7.4-fpm php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl php7.4-xdebug -y
/etc/php/7.4/apache2/php.ini