Skip to content

Instantly share code, notes, and snippets.

View carloswm85's full-sized avatar
🎯
Compiling...

Carlos W. Mercado carloswm85

🎯
Compiling...
View GitHub Profile
// Mask the field for the GDE file name input https://stackoverflow.com/a/56704775/7389293
$('.cuitcuil-mask').mask('00-00000000-0', {
'translation': {
//'#': { pattern: /#/, fallback: '#', optional: false },
},
placeholder: "__-________-_"
});
<mat-card class="mb4">
<mat-list>
<mat-list-item>
<span class="underline-and-strong">ERC</span>:
<span class="low-ranking">LR-1</span> •
<span class="low-ranking">LR-2</span> •
<span class="medium-low-ranking">MLR-1</span> •
<span class="medium-low-ranking border-bottom">MLR-2</span> •
<span class="medium-high-ranking">MHR-1</span> •
<span class="medium-high-ranking">MHR-2</span> •
#!/bin/bash
# shellcheck disable=SC2002
# shellcheck disable=SC2020
# shellcheck disable=SC2086
# shellcheck disable=SC2317
# shellcheck disable=SC1073
# shellcheck disable=SC1009
# shellcheck disable=SC1072
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Web.Mvc;
using iText.Barcodes;
using iText.IO.Font;
using iText.IO.Font.Constants;
using iText.IO.Image;
using iText.Kernel.Colors;
@carloswm85
carloswm85 / Program.cs
Created January 17, 2025 12:02
Comprehensive guide for beginners learning ASP.NET Core MVC, covering essential topics like application setup, web server hosting, routing, dependency injection, and page views. It delves into advanced features, including Entity Framework Core, authentication with ASP.NET Core Identity, role and claims-based authorization, error handling, and cl…
// Configuration for netcore 8.0
using EmployeeManagement.Models;
using EmployeeManagement.Security;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.Authorization;
using Microsoft.EntityFrameworkCore;
using NLog;
using NLog.Web;

An unhandled exception occurred while processing the request.

AuthenticationException: Cannot determine the frame size or a corrupted frame was received.

System.Net.Security.SslStream.GetFrameSize(ReadOnlySpan buffer)

HttpRequestException: The SSL connection could not be established, see inner exception.

System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken)

import { Component, OnInit } from '@angular/core';
import { MatTableModule } from '@angular/material/table';
import { BinanceRestService } from '../../../core/services/binance-rest.service';
import {
BinanceData,
BinanceEmac,
} from '../../../core/interfaces/binance.interface';
import { CommonModule } from '@angular/common';
import { EmacPositionEmojiPipe } from '../../../core/pipes/emac-position-emoji.pipe';
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
<!--- Note that these columns can be defined in any order.
The actual rendered columns are set as a property on the row definition" -->
<!-- Number Column -->
<ng-container matColumnDef="position">
<th mat-header-cell *matHeaderCellDef> Nº </th>
<td mat-cell *matCellDef="let element"> {{element.position}} </td>
</ng-container>
@carloswm85
carloswm85 / SearchEngine.cs
Created November 15, 2024 23:04
This is what the component should include. I'm not sure how to turn it into a component diagram though (not sure if even necessary either).
public enum RoleEnum
{
Student,
Company
}
public interface ISearchEngine
{
void Search(string query); // General search method
}