Skip to content

Instantly share code, notes, and snippets.

View rafael-neri's full-sized avatar
💻
Working from home

Rafael Neri rafael-neri

💻
Working from home
View GitHub Profile
@rafael-neri
rafael-neri / extensao-trabalho-ada.md
Created December 2, 2025 22:57
Extensão do Desafio — Mini Loja (JS)

Extensão do Desafio — Mini Loja (JS)

Uso de try/catch e Map

Continuaremos evoluindo o projeto da Mini Loja.
Agora você deverá adicionar:

  • Tratamento de erros com try/catch
  • Uso de Map() como estrutura de dados no projeto
@rafael-neri
rafael-neri / trabalho-ada.md
Created December 1, 2025 23:35
Trabalho Lógica de Programação - Ada

Desafio Prático — Mini Loja (projeto)

Objetivo: aplicar os conceitos vistos em aula construindo um pequeno gerenciador de catálogo e carrinho de compras em JavaScript. O projeto integra uso de tipos, coerções, arrays, matrizes, funções, Math, buscas e transformações.


Escopo mínimo

  • Um catálogo de produtos representado por um array de objetos: cada produto tem id, nome, preco (number) e estoque (number).
  • Funções para listar produtos, buscar produto por nome/id (find/findIndex), e filtrar por faixa de preço (filter).
  • Um carrinho (array) que permite: adicionar produto (verificando estoque), remover produto, alterar quantidade, e calcular total.
@rafael-neri
rafael-neri / noinspection.php
Created July 2, 2024 14:06 — forked from gskema/noinspection.php
PhpStorm @noinspection list of all tags
<?php
/** @noinspection ? */
// PhpUndefinedGotoLabelInspection Undefined goto label
// PhpUndefinedVariableInspection Undefined variable
// PhpUndefinedMethodInspection Undefined method
// PhpUndefinedNamespaceInspection Undefined namespace
// PhpUndefinedClassInspection Undefined class
// PhpUndefinedFunctionInspection Undefined function
{
// Desabilita a Telemetria
"telemetry.enableTelemetry": false,
"redhat.telemetry.enabled": false,
// Configurações dos arquivos
"files.autoSave": "onFocusChange",
"files.encoding": "utf8",
"files.insertFinalNewline": true,
"files.restoreUndoStack": true,
@rafael-neri
rafael-neri / commands.sh
Last active December 29, 2022 18:21
Atomate run docker-composer in specific folder
# if using bash
echo 'export WORKRDIR="$HOME/my/workdir"' >> ~/.bashrc
# if using zsh
echo 'export WORKRDIR="$HOME/my/workdir"' >> ~/.zshrc
# download script
sudo curl https://bit.ly/3G9oEZk --output /bin/script
# permission
@rafael-neri
rafael-neri / linkedin.js
Created January 26, 2022 20:15 — forked from CViniciusSDias/linkedin.js
Aceitar todos os convites do LinkedIn
document
.querySelectorAll('button[aria-label^="Aceitar o convite de"]')
.forEach((btn, i) => setTimeout(() => btn.click(), i + 500));
@rafael-neri
rafael-neri / .github_workflows_schedule.yaml
Created January 10, 2022 00:53
Schedule 15 minutes from GitHub - Cron
name: 15-minute-schedule
on:
schedule:
- cron: '*/15 * * * *'
jobs:
cron:
runs-on: ubuntu-latest
steps:
- name: Call your API route
run: |
@rafael-neri
rafael-neri / gitflow-breakdown.md
Created November 11, 2021 00:48 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@rafael-neri
rafael-neri / 01-ServeCommand.php
Last active September 27, 2021 22:45
Add Support to "php artisan serve" in Lumen
<?php
// File: app/Console/Commands/ServeCommand.php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class ServeCommand extends Command {
@rafael-neri
rafael-neri / compat_l5.php
Created September 26, 2021 22:27 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)