Skip to content

Instantly share code, notes, and snippets.

View marcpachecog's full-sized avatar
🎯
Focusing

Marc Pacheco García marcpachecog

🎯
Focusing
View GitHub Profile
{
"id": "orange-bill-template-flex-001",
"title": "Orange-Style Billing Template (Flex Layout)",
"description": "A modern telecommunications billing template using flexbox layout for improved responsive design and better alignment",
"dataSchema": {
"data": {
"company": {
"name": "Orange",
"logo": "",
"color": "#FF6600"
@marcpachecog
marcpachecog / use-datagrid-query.ts
Created May 27, 2025 15:26
use-datagrid-query.ts
import * as React from "react";
import {
type GridSortModel,
type GridPaginationModel,
type GridSortItem,
type GridValidRowModel,
} from "@mui/x-data-grid-premium";
import {
useQuery,
@marcpachecog
marcpachecog / nominas_drizzle.ts
Created May 12, 2025 08:31
nominas_drizzle.ts
import {
pgTable,
serial,
varchar,
integer,
decimal,
boolean,
date,
timestamp,
jsonb,
@marcpachecog
marcpachecog / nominas_migration.sql
Created May 12, 2025 08:28
nominas_migration.sql
CREATE TYPE "public"."absence_type_category_type" AS ENUM('ANNUAL_LEAVE', 'COMMON_ILLNESS_ACCIDENT_NON_WORK', 'WORK_ACCIDENT', 'PROFESSIONAL_ILLNESS', 'MATERNITY', 'PATERNITY', 'RISK_DURING_PREGNANCY_LACTATION', 'CHILD_CARE_LEAVE', 'PAID_LEAVE_MARRIAGE', 'PAID_LEAVE_DEATH_ILLNESS_RELATIVE', 'PAID_LEAVE_MOVING_HOME', 'PAID_LEAVE_PUBLIC_DUTY', 'PAID_LEAVE_UNION_REPRESENTATION', 'UNPAID_LEAVE', 'STRIKE', 'ABSENTEEISM_UNJUSTIFIED', 'OTHER_PAID_LEAVE', 'OTHER_UNPAID_LEAVE');--> statement-breakpoint
CREATE TYPE "public"."bank_account_type" AS ENUM('PAYROLL', 'COMPANY_OPERATING', 'OTHER');--> statement-breakpoint
CREATE TYPE "public"."cel_rule_scope_type" AS ENUM('SYSTEM_GLOBAL', 'COMPANY_CUSTOMIZABLE', 'COMPANY_SPECIFIC');--> statement-breakpoint
CREATE TYPE "public"."cel_rule_type" AS ENUM('EARNING_CALCULATION', 'DEDUCTION_CALCULATION', 'SOCIAL_SECURITY_BASE_CALCULATION', 'SOCIAL_SECURITY_QUOTA_CALCULATION', 'IRPF_BASE_CALCULATION', 'IRPF_WITHHOLDING_CALCULATION', 'ABSENCE_IMPACT_CALCULATION', 'SETTLEMENT_COMPONEN
import sys
import pandas as pd
slug = sys.argv[1]
file_path = f"results/{slug}"
df = pd.read_csv(f"{file_path}/{slug}_raw.csv")
# Clean price column
df['price'] = df['price'].str[2:]
df['price'] = pd.to_numeric(df['price'], downcast='integer')
import fs from "fs";
import { spawn } from "child_process";
import { URL } from "url";
import puppeteer from "puppeteer";
import { format } from "@fast-csv/format";
import minimist from "minimist";
(async () => {
await main();
})();