Skip to content

Instantly share code, notes, and snippets.

View pvguerra's full-sized avatar

Paulo Guerra pvguerra

  • Natal, Brazil
View GitHub Profile
@pvguerra
pvguerra / phpcs.md
Last active February 16, 2023 00:06
PHPCS (VSCode & PHPStorm)

Repositório Oficial → https://github.com/squizlabs/PHP_CodeSniffer

O PHPCS, abreviação para PHP CodeSniffer é uma ferramenta que tem como objetivo detectar violações de padrões de código.

Esse tutorial busca auxiliar na instalação e configuração do phpcs nas duas principais ferramentas de desenvolvimento da equipe (VSCode e PHPStorm) a fim de conseguirmos alcançar um bom nivelamento da PSR12 em todos os projetos em atividade.

Instalação

O PHPCS precisa de uma versão igual ou superior à 5.4.0.

@pvguerra
pvguerra / helpers.php
Created July 4, 2021 23:30
Laravel Helpers Function
<?php
if (!function_exists('currencies')) {
function currencies(): array
{
return [
['code' =>'USD', 'name' => 'US Dollar', 'symbol' => '$'],
['code' =>'BRL', 'name' => 'Brazilian Real', 'symbol' => 'R$'],
['code' =>'EUR', 'name' => 'Euro', 'symbol' => '€'],
['code' =>'GBP', 'name' => 'Pound Sterling', 'symbol' => '£'],
@pvguerra
pvguerra / ubuntu-dev.md
Last active December 4, 2022 23:09
Ubuntu 20.04 for Devs

ubuntu-dev

A readme with some steps needed to configure a clean Ubuntu 20.04 environment for development:

Update & Upgrade

sudo apt update && sudo apt upgrade

Git

sudo apt install git-all

@pvguerra
pvguerra / gistmarkdown.md
Last active February 10, 2020 17:13
Markdown Tips

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@pvguerra
pvguerra / save_dicom_data.md
Last active August 28, 2018 15:54
Save DICOM data from DCM4CHEE directories
import dicom, glob, os

files = []
output_file = open('filename.csv', 'w')

print('Creating list...\n')
i = 0

for root, dirs, files in os.walk('/Users/pauloguerra/DICOM_TEST/'):
@pvguerra
pvguerra / config_centos7_server.md
Last active August 31, 2018 18:20
Vagrant - macOS - CentOS7

Vagrant on Mac OS 10.13.3 High Sierra

Create and configure lightweight, reproducible, and portable development environments. Vagrant is an amazing tool for managing virtual machines via a simple to use command line interface.

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox
$ brew cask install vagrant

Vagrant Box

Add the Vagrant box you want to use:

@pvguerra
pvguerra / dsei.yaml
Created November 2, 2017 02:07
Fixture YAML para Django com todos Distritos Sanitários Especiais Indígenas (DSEI) do Brasil.
- model: appName.modelName
pk: '1'
fields:
nome: Alagoas/Sergipe
- model: appName.modelName
pk: '2'
fields:
nome: Altamira
- model: appName.modelName
pk: '3'
@pvguerra
pvguerra / etnias.yaml
Created November 2, 2017 02:05
Fixture YAML para Django contendo todas etnias indígenas do Brasil.
- model: appName.modelName
pk: '1'
fields:
nome: Aconã
- model: appName.modelName
pk: '2'
fields:
nome: Aikaná
- model: appName.modelName
pk: '3'
@pvguerra
pvguerra / macOS-dev.md
Last active July 17, 2021 13:43
A readme with some steps needed to configure a clean macOS Big Sur 11.2 for development

macOS-dev

A readme with some steps needed to configure a clean macOS Big Sur 11.2 for development:

iTerm 💻

Download iTerm is highly recommended.

Oh My ZSH! 💻

Oh-My-ZSH is an open source, community-driven framework for managing your ZSH configuration.