Skip to content

Instantly share code, notes, and snippets.

@zerK4
zerK4 / server.sh
Last active August 6, 2025 06:51
Laravel custom server starter
#!/bin/bash
# Color definitions
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
GRAY='\033[0;90m'
@zerK4
zerK4 / base.css
Created January 13, 2025 08:05
VScode setup
* {
font-family: "CaskaydiaMono Nerd Font" !important;
font-weight: 400;
font-size: 14px !important;
}
.monaco-editor .ced-1-TextEditorDecorationType32-2 {
display: none !important;
}
import { FieldConfig } from "@/schemas/schemaConfigs";
import { Control } from "react-hook-form";
export type FieldConfigs = Record<string, FieldConfig>;
export type SharedFormFieldProps<T extends keyof FieldConfigs> = {
fieldName: string;
control: Control<any>;
config: FieldConfigs[T];
label: string;
@zerK4
zerK4 / DebugBar.tsx
Last active January 4, 2025 15:56
NextJs-Laravel-debugbar component
"use client";
import { useDebugBar } from "@/providers/debugBarProvider";
import { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
import { handleDebugBarLogs } from "@/lib/debugBar";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Accordion,
AccordionContent,
<?php
namespace App\Repositories\Eloquent;
use App\Repositories\Interfaces\EloquentRepositoryInterface;
use App\Resources\BaseResource;
use App\Traits\HasRelations;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\RelationNotFoundException;
@zerK4
zerK4 / settings.json
Created October 18, 2024 13:13
VSCode minimal settings
{
"vscode_custom_css.imports": ["file:///Users/[username]/.vscode/base.css"],
// "apc.electron": {
// "frame": false,
// "transparent": true,
// "titleBarStyle": "hidden",
// "vibrancy": "ultra-dark",
// "opacity": 0.99,
// "trafficLightPosition": {
// "x": 15,
@zerK4
zerK4 / keybindings.json
Created October 18, 2024 13:11
VSCode keybindings
// Place your key bindings in this file to override the defaults
[
{
"key": "cmd+g s",
"command": "search.action.openNewEditor",
"when": "editorTextFocus && vim.active && vim.overrideCopy && vim.use<D-c> && !inDebugRepl && vim.mode !== 'Insert'"
},
{
"key": "cmd+g t",
"command": "editor.action.goToTypeDefinition",
@zerK4
zerK4 / base.css
Created October 18, 2024 13:09
VSCode minimal styling
* {
font-family: "FiraCode Nerd Font" !important;
font-size: 13px !important;
}
.editor .title {
background: transparent !important;
}
.find-widget {