Skip to content

Instantly share code, notes, and snippets.

View juliocabrera820's full-sized avatar
馃摏
馃拵馃馃徏

Julio Cabrera juliocabrera820

馃摏
馃拵馃馃徏
View GitHub Profile
@juliocabrera820
juliocabrera820 / tech-stack.md
Created June 24, 2025 02:51
Template tech stack

Technology Stack Document Template

This document defines the technology stack for [Insert project name], detailing tools, frameworks, and services for backend, frontend, database, deployment, and monitoring.

1. Backend

  • Framework: [e.g., Elixir/Phoenix, Node.js]
  • Language: [e.g., Elixir, Python]
  • Libraries:
  • [e.g., [Library]: [Purpose, e.g., HTTP requests]

Application Flow Document Template

This document outlines the application flow for [Insert project name], detailing user interactions, navigation paths, and page transitions. It ensures a cohesive user experience and aligns frontend and backend functionality.

1. Overview

  • Application Purpose: [e.g., Describe the application鈥檚 core functionality]
  • User Types: [e.g., Guest users, admin users]
  • Navigation Type: [e.g., Single-page application, multi-page]

Product Requirements Document (PRD) Template

1. Overview

  • Project Name: [Insert project name]
  • Description: [Provide a brief description of the project, including its purpose and key functionality]
  • Objective: [State the primary goal of the project, e.g., deliver an MVP, improve user experience]

2. Goals

@juliocabrera820
juliocabrera820 / teams_spec.rb
Created April 16, 2021 02:55
example testing an active record exception
it 'returns a 404 as http status' do
expect { get '/api/v1/teams/3' }.to raise_exception(ActiveRecord::RecordNotFound)
en
@juliocabrera820
juliocabrera820 / settings.json
Created April 2, 2021 16:47
configuraci贸n vscode
{
"terminal.integrated.fontSize": 14,
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"editor.tabSize": 2,
"editor.fontSize": 14,
"editor.lineHeight": 26,
"editor.fontFamily": "cascadia code",
@juliocabrera820
juliocabrera820 / rails_helper.rb
Last active January 15, 2021 23:50
preparar entorno de pruebas en rails
# frozen_string_literal: true
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/environment', __dir__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
@juliocabrera820
juliocabrera820 / commit.md
Last active August 10, 2020 03:05
Usando commitlint,husky y commitizen

Instalar las siguientes dependencias de desarrollo

  • @commitlint/cli
  • @commitlint/config-conventional

Crear el archivo commitlint.config.js, y agregar el siguiente contenido

module.exports = {extends: ['@commitlint/config-conventional']}

Inicializar repositorio

@juliocabrera820
juliocabrera820 / commits.md
Last active January 3, 2025 03:37
Conventional commits

Git Commit Message Style Guide

Message Structure

A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer. The layout looks like this:

<type>(<scope>): <subject>
<BLANK LINE>
@juliocabrera820
juliocabrera820 / add_foreign_key.md
Last active June 30, 2021 23:35
Agregar llave foranea a trav茅s de una migraci贸n,y establecer la relaci贸n en los modelos

Ejemplo en el que la relacion es OneToMany

Un propietario tiene muchos autos

Se quiere agregar una llave foranea en la tabla cars

Ejecutar el siguiente comando

rails g migration AddOwnerRefToCars owner:references

Explicaci贸n comando

@juliocabrera820
juliocabrera820 / applyMiddleware.js
Last active December 17, 2020 04:46
Redux concepts
const REQUESTING_DATA = 'REQUESTING_DATA'
const RECEIVED_DATA = 'RECEIVED_DATA'
const requestingData = () => { return {type: REQUESTING_DATA} }
const receivedData = (data) => { return {type: RECEIVED_DATA, users: data.users} }
const handleAsync = () => {
return function(dispatch) {
// dispatch request action here
dispatch(requestingData())