Skip to content

Instantly share code, notes, and snippets.

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

Carlos W. Mercado carloswm85

🎯
Compiling...
View GitHub Profile
@carloswm85
carloswm85 / UpperCaseAttribute.cs
Created October 11, 2025 20:17 — forked from pazteddy/UpperCaseAttribute.cs
Atributo personalizado para convertir un texto a mayúsculas
[AttributeUsage(AttributeTargets.Property)]
public class UpperCaseAttribute : Attribute
{
}
public static class AttributeProcessor
{
public static void ApplyUpperCase(object obj)
{
@carloswm85
carloswm85 / PdfProtection.cs
Created September 25, 2025 13:01
The `PdfProtection` class is a utility for creating and managing password-protected PDF documents using iText 7, offering configurable security through encryption levels (40-bit, 128-bit, AES-128, AES-256) and fine-grained permission flags (printing, copying, modifying, annotating, filling forms, etc.). It allows both synchronous and asynchronou…
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using iText.Kernel.Exceptions;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Draw;
using iText.Layout;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using iText.Kernel.Geom;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Draw;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;
@carloswm85
carloswm85 / Instalaciones-DotNET.md
Created September 18, 2025 23:12 — forked from pazteddy/Instalaciones-DotNET.md
Instalaciones recomendadas para el curso .NET Backend: .NET Core, SQL Server y seguridad JWT
// 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;