Skip to content

Instantly share code, notes, and snippets.

View jlcarrascof's full-sized avatar

Javier Jesus Martínez Fariñas jlcarrascof

View GitHub Profile
@jlcarrascof
jlcarrascof / usefulLinks.txt
Created February 27, 2025 13:58
Links and Tools for Laravel 11 Invoice System
@jlcarrascof
jlcarrascof / text-astro.txt
Last active February 20, 2025 15:35
Text for the Astro Portfolio
Web Development
I create modern and responsive web applications using the latest technologies.
UI/UX Design
I design intuitive and attractive interfaces to enhance the user experience.
Consulting
@jlcarrascof
jlcarrascof / hoisting.js
Created January 31, 2025 21:31
Hoisting Example.
console.log(a); // What value does 'a' have here?
var a = 5;
console.log(b); // What value does 'b' have here?
let b = 10;
function example() {
console.log(c); // What value does 'c' have here?
var c = 15;
@jlcarrascof
jlcarrascof / index-content.html
Created January 28, 2025 16:11
FAQ-Accordion-FEM
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png">
<title>Frontend Mentor | FAQ accordion</title>
@jlcarrascof
jlcarrascof / laravel11-fac-video-16.js
Created January 24, 2025 22:43
Laravel 11 - Invoicing - Video 16 - SweetAlert code
<script>
function confirmDelete(categoryId) {
Swal.fire({
title: '¿Are you sure to delete?',
text: "¡Confirm delete, please!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes',
@jlcarrascof
jlcarrascof / video-23.mjs
Last active January 21, 2025 22:56
Additional content for Video # 23
// Additional Products for Hardware
{ name: 'Screwdriver Set', quantity: 10, price: 25.99, cost: 20.99, departmentId: 1, supplierId: 4 },
{ name: 'Drill Machine', quantity: 5, price: 79.99, cost: 60.99, departmentId: 1, supplierId: 7 },
{ name: 'Wrench Set', quantity: 12, price: 35.99, cost: 28.99, departmentId: 1, supplierId: 4 },
@jlcarrascof
jlcarrascof / seed.mjs
Last active January 9, 2025 15:19
Create suppliers in seed.mjs
// Create suppliers
await prisma.supplier.createMany({
data: [
{ name: 'Paints Supplier', contact: '[email protected]' },
{ name: 'Tools Supplier', contact: '[email protected]' },
{ name: 'Global Electronics Inc.', contact: '[email protected]', address:'123 Tech Park, Silicon Valley, CA', phone: '+1-555-123-4567', country: 'United States',
},
{ name: 'Innovative Supplies Ltd.', contact: '[email protected]', address: '456 Industrial Ave, Toronto, ON', phone: '+1-416-555-7890', country: 'Canada',
},
{ name: 'Tech Solutions GmbH', contact: '[email protected]', address: '789 Innovation Strasse, Berlin', phone: '+49-30-123-4567', country: 'Germany',
@jlcarrascof
jlcarrascof / challenge-day5.py
Created February 12, 2024 17:43
Codigo Facilito Python Challenge - Day 5
# CodigoFacilito Challenge 5: Registro de usuarios usando diccionarios, opciones de menú y funciones
users = {}
def new_user(user_id):
print("Registro del usuario:", user_id)
# Solicita y valida el nombre
while True:
first_name = input('Ingresa tu nombre: ')
@jlcarrascof
jlcarrascof / challenge-day4.py
Created February 11, 2024 15:37
Codigo Facilito Python Challenge - Day 4
# CodigoFacilito Challenge 4: Registro de usuarios con ID usando diccionarios y opciones de menú
users = {}
while True:
print("\nMenú:")
print("A.- Registrar nuevos usuarios")
print("B.- Listar usuarios")
print("C.- Ver información de un usuario")
print("D.- Editar información de un usuario")
@jlcarrascof
jlcarrascof / challenge-day3.py
Created February 10, 2024 14:17
Codigo Facilito Python - Day 3 Challenge
# CodigoFacilito Challenge 3: Registro de usuarios con ID usando listas
num_users = int(input('¿Cuántos nuevos usuarios se pretenden registrar? '))
user_ids = []
# Itera sobre el número de usuarios a registrar
for i in range(0, num_users):
print("Registro del usuario:", i+1)
# Solicita y valida el nombre