Skip to content

Instantly share code, notes, and snippets.

View acabreragnz's full-sized avatar

Toni Cabrera acabreragnz

  • Bixlabs
  • Montevideo, Uruguay
View GitHub Profile
@acabreragnz
acabreragnz / FeatureFlagProvider.php
Last active August 3, 2024 17:30
Acapedia - Laravel using the FeatureFlagProvider
<?php
// JsonResource
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
use Business\FeatureFlagProvider\FeatureFlagProvider;
use Business\FeatureFlagProvider\FeatureFlags;
#!/bin/bash
# This script, named generate-pr-report.sh, generates a Markdown report of pull requests for specified GitHub users and date ranges within a GitHub project.
# It must be executed within the root directory of the project you want to analyze.
#
# Usage:
# ./generate-pr-report.sh "user1,user2" "2024-02,2024-03"
# This command generates a report for pull requests created by user1 and user2 between February 2024 and March 2024.
#
# ./generate-pr-report.sh "user1"

Visit Counter for the Article Abstract Page

Objective

Implement a visit counter in a Vue2 application using Vuex and Vuetify on the page src/pages/Article/ArticleAbstractPage.vue. This setup includes error handling, a conditional reset mechanism, and a switch for controlling increment functionality, integrated with a managed loading state.

Requirements

  1. Vuex State Management:
@acabreragnz
acabreragnz / mock-pinia-with-vitest.ts
Last active October 11, 2024 11:06
Mock a pinia store using vitest
import { beforeEach, describe, it, expect } from 'vitest';
import { fn } from '@vitest/spy';
import { useSomeStore } from '@/useSomeStore';
import { createTestingPinia } from '@pinia/testing';
import { setActivePinia } from 'pinia';
describe('useCreditStore - Test with Mocked Getter', () => {
let mockCreditStore: Record<string, any>;
beforeEach(() => {
@acabreragnz
acabreragnz / heading-typography-guide.html
Created May 8, 2026 16:33
Heading typography diff — Evergreen vs Materials refreshed (ENG-4593 / PR #6850)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Heading typography diff — Evergreen vs Materials (refreshed)</title>
<style>
body {
font-family: system-ui, -apple-system, sans-serif;
color: #18181b;
margin: 0;
@acabreragnz
acabreragnz / spotcheck-guide.html
Last active May 8, 2026 23:31
ENG-4593 spot-check: master vs branch for Heading size 100/200 callers (muted default baked in)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ENG-4593 — Heading size=100 spot-check (muted default + 10→12 bump)</title>
<style>
body { font-family: system-ui, -apple-system, sans-serif; color: #18181b; margin: 0; padding: 32px; background: #fff; max-width: 1600px; }
h1 { font-size: 22px; margin: 0 0 4px; color: #101840; }
.lead { color: #52525b; font-size: 13px; margin: 0 0 24px; }
section { margin: 0 0 40px; }