Skip to content

Instantly share code, notes, and snippets.

View atomjoy's full-sized avatar

Atomjoy atomjoy

View GitHub Profile
@atomjoy
atomjoy / WatermarkImage.php
Last active June 3, 2026 08:59
Laravel Intervention text watermark on image with custom font.
<?php
namespace App\Actions\Website;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Typography\Font;
@atomjoy
atomjoy / Shiki-Vite-Chunks.md
Created May 26, 2026 18:39
Vite Shiki highlighter chunks in Laravel 13, Vue3, Inertia (no warnings).

Vite shiki chunks in Laravel 13, Vue3, Inertia (no warnings)

import inertia from '@inertiajs/vite';
import { wayfinder } from '@laravel/vite-plugin-wayfinder';
import tailwindcss from '@tailwindcss/vite';
import vue from '@vitejs/plugin-vue';
import laravel from 'laravel-vite-plugin';
import { defineConfig } from 'vite';
@atomjoy
atomjoy / NewsletterMail.php
Created May 18, 2026 16:53
Laravel Newsletter Mail class with notifications MailMessage.
<?php
namespace App\Mail;
use App\Models\Newsletter;
use App\Models\Social;
use App\Models\Subscriber;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
@atomjoy
atomjoy / markdown-blog.txt
Last active May 13, 2026 16:57
Markdown example with css.
###### Parse with atomjoy/parsedown-media and insert in component with <div v-html="markdown" />
# A Practical Guide to Sending Mail Using Jobs & Queues in Laravel 12
In Laravel, a job is a PHP class that represents a single unit of work to be executed in the background(like sending an email, exporting data, or processing a report). It typically contains some task that might take time to complete. You typically write your business logic inside the job.
## Display code block
A queue is like a line where tasks are handled one by one in the order they arrive. In Laravel, queues let you delay time-consuming work — like sending emails — so it runs in the background instead of slowing down your app. All the jobs are stored in the queue.
@atomjoy
atomjoy / highlight.blade.php
Last active May 13, 2026 16:46
Vue3 Highlighters and splide slider from CDN in Laravel Inertia Starter Kit (v-html code).
{{-- Code highlight.js --}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/php.min.js"></script>
<script>
/* Required */
document.addEventListener('DOMContentLoaded', (event) => {
setTimeout(() => {
@atomjoy
atomjoy / FireFox-Disable-Update-Popup.md
Created May 11, 2026 09:34
Firefox how to disable update popup.

Firefox Disable Update Popup

Instal Firefox version 146.0 (nie ma zacinania i skakania na filmach i rolkach youtube i stronach www).

Update policies

Create in directory C:\Program Files\Mozilla Firefox\distribution\policies.json file with content and restart FireFox.

@atomjoy
atomjoy / InviewObserver-LoadSchema.md
Last active May 11, 2026 08:54
Inview observer, load schema js.

InviewObserver

let dark = false

function changeMode() {
  const el = document.querySelector('#body')
  dark = !dark
  dark ? el.classList.add('dark') : el.classList.remove('dark')
}
@atomjoy
atomjoy / Infinite-Images-Scroll.html
Last active December 13, 2025 14:10
Infinite Images Scroll in HTML CSS
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Infinite images sccroll</title>
<meta name="robots" content="noindex, nofollow">
@atomjoy
atomjoy / Youtube-Api.md
Last active October 29, 2025 16:22
Youtube API
@atomjoy
atomjoy / PrimeVue-Customization.md
Last active October 26, 2025 13:07
PrimeVue components configuration, polish locales, change color (color picker, date picker, custom theme style).

PrimeVue Components Customization

PrimeVue components configuration, polish locales, change color (color picker, date picker, custom theme style).

Add in Vue app.js

Install with npm install primevue @primeuix/themes

import PrimeVue from 'primevue/config';