Skip to content

Instantly share code, notes, and snippets.

View ArielMejiaDev's full-sized avatar
🐘
Focusing

ArielMejiaDev ArielMejiaDev

🐘
Focusing
View GitHub Profile
@nicostombros
nicostombros / data-table.tsx
Last active May 23, 2024 10:00
Shadcn UI implementation of DataTable and Pagination components working together
// same as your regular shadcn datatable implementation (which uses tanstack table)
// note that the shadcn datatable uses shadcn table for the ui. see https://ui.shadcn.com/docs/components/data-table
import {
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
@Sutil
Sutil / form.tsx
Last active May 20, 2024 15:35
Shandcn UI Money Mask Input - NextJS.
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import MoneyInput from "src/components/custom/money-input";
import { Button } from "src/components/ui/button";
import { Form } from "src/components/ui/form";
import * as z from "zod";
const schema = z.object({
@ArielMejiaDev
ArielMejiaDev / build-and-deploy.yml
Created October 10, 2023 22:02 — forked from imlautaro/build-and-deploy.yml
Workflow to deploy a Nuxt 3 app to GitHub Pages with PNPM
name: Build and Deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
@imlautaro
imlautaro / build-and-deploy.yml
Last active October 10, 2023 22:02
Workflow to deploy a Nuxt 3 app to GitHub Pages with NPM
name: Build and Deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
@bradtraversy
bradtraversy / laravel_valet_setup.md
Last active April 25, 2024 06:41
Laravel Valet install on mac

Laravel Valet Setup (Mac)

This will get you setup with Laravel & Valet on your Mac. Quentin Watt has a good video tutorial on getting setup here as well

Install Homebrew

Go to https://brew.sh/ and copy the command and run in your terminal

It will be something like this...

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@kossoy
kossoy / .Laravel-Jetstream-Inertia.md
Last active October 23, 2023 08:40
Setup project with Laravel, Jetstream (FB and Google through Socialite), and Inertia.js with Vue.js
before_script:
- echo 'Before script'
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- chmod 700 ~/.ssh
- ssh-keyscan -H 'domain.com' >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
building:
<?php
namespace App\Traits;
trait FullTextSearch
{
/**
* Replaces spaces with full text search wildcards
*
* @param string $term
@JuanDMeGon
JuanDMeGon / Kernel.php
Last active November 28, 2023 15:13
A small Laravel command to collect the sessions garbage if applicable to the current session driver
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
//...
@rubenvanassche
rubenvanassche / tests.yml
Last active March 3, 2024 11:12
A simple Laravel testing workflow for GitHub Actions
name: Tests (PHP)
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1