Skip to content

Instantly share code, notes, and snippets.

View srdelarosa's full-sized avatar
⚛️
Focusing

Renato De la Rosa srdelarosa

⚛️
Focusing
View GitHub Profile
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { OverlayModule } from '@angular/cdk/overlay';
import { CdkTreeModule } from '@angular/cdk/tree';
import { PortalModule } from '@angular/cdk/portal';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
{
"ConnectionStrings": {
"Qhatu": "Data Source=desarrollo-sqlserver.database.windows.net;Initial Catalog=qhatu;Integrated Security=False;User ID=qhatu;Password=P4$$w0rd2022.;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
const dataHeroes = [
{
id: 2312317,
heroName: 'Captian America',
realName: 'Steve Rogers',
description:
'El Capitán América, cuyo nombre real es Steven "Steve" Grant Rogers, es un superhéroe ficticio que aparece en los cómics estadounidenses publicados por Marvel Comics.',
photoUrl:
'https://pm1.narvii.com/6072/a6accc9fef58647c3aa6607a712b5e6bfefa07d4_hq.jpg',
},
using Microsoft.EntityFrameworkCore;
using NH.WikiMovies.Infrastructure.Context;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace NH.WikiMovies.Infrastructure.Repositories
{
public class GenericRepository<T> where T : class
package com.newhorizons.takeitnow.security.domain.service;
import com.newhorizons.takeitnow.security.domain.entity.UserApplication;
import com.newhorizons.takeitnow.security.domain.repository.IUserRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
INSERT INTO `users` (username, password, active, first_name, last_name, email) VALUES ('srdelarosab','$2a$10$ykhXmCAam5FUEF9GN.4Z8OwwWJidvMii6VFYe77cmS2X6oF6p4W86',1, 'Renato', 'De la Rosa','[email protected]');
INSERT INTO `users` (username, password, active, first_name, last_name, email) VALUES ('admin','$2a$10$qGyDfZLBB.SgLv7GCP3uZe3oM38fVtr58T1iZ1LNOvO61loNUAAaK',1, 'Sergio', 'De la Rosa','[email protected]');
INSERT INTO `roles` (name) VALUES ('ROLE_USER');
INSERT INTO `roles` (name) VALUES ('ROLE_ADMIN');
INSERT INTO `users_roles` (user_id, role_id) VALUES (1, 1);
INSERT INTO `users_roles` (user_id, role_id) VALUES (2, 2);
INSERT INTO `users_roles` (user_id, role_id) VALUES (2, 1);
git config --global user.name "Toffee De la Rosa"
git config --global user.email "[email protected]"
git init
git add .
git commit -m "Mi primer commit"
package com.newhorizons.takeitnow.products.presentation.web.controller;
import com.newhorizons.takeitnow.products.application.mainmodule.dto.ProductDto;
import com.newhorizons.takeitnow.products.application.mainmodule.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
package com.newhorizons.takeitnow.item.infrastructure.feign;
import com.newhorizons.takeitnow.item.domain.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;
@FeignClient(name = "product-service", url = "http://localhost:8001/", path = "/takeitnow/api")
package com.newhorizons.takeitnow.item.infrastructure.repository.feign;
import com.newhorizons.takeitnow.item.application.mainmodule.dto.ItemDto;
import com.newhorizons.takeitnow.item.application.mainmodule.dto.ProductDto;
import com.newhorizons.takeitnow.item.application.mainmodule.mapper.IProductMapper;
import com.newhorizons.takeitnow.item.domain.entity.Product;
import com.newhorizons.takeitnow.item.domain.repository.IItemRepository;
import com.newhorizons.takeitnow.item.infrastructure.feign.IProductFeign;
import org.springframework.beans.factory.annotation.Autowired;