Skip to content

Instantly share code, notes, and snippets.

View atomjoy's full-sized avatar

Atomjoy atomjoy

View GitHub Profile
@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';
@atomjoy
atomjoy / PaginationResource.md
Last active November 6, 2025 09:29
Laravel pagination resource helper.

Pagination Resource Helper (Vue, Laravel)

Laravel pagination resource helper for vue custom pagination component with store.

Make all resource files

php artisan make:model Gif -arR
@atomjoy
atomjoy / Preload-Image-Js.md
Last active October 24, 2025 10:22
Preload images in javascript.

Preload Images JS

How to preload images in html with javascript and storage (asynchronously).

Function

const preloadImage = src => new Promise((resolve, reject) => {
    const image = new Image()
    image.onload = resolve
@atomjoy
atomjoy / spicy-colors.html
Last active October 24, 2025 09:06
Ui Ux spicy colors.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spicy Colors</title>
</head>
<style>
@atomjoy
atomjoy / CSS-List-Grid-Columns.md
Last active October 20, 2025 10:17
Equal width columns in CSS Grid.

List Grid Columns

Equal width columns in CSS Grid.

<style>
.item-header {
	/* grid */
	display: grid;
	gap: 0em;
@atomjoy
atomjoy / Vue-Store-Computed.md
Last active October 20, 2025 08:58
Store with computed and v-model.

Vue Store Computed

Pinia store

File /stores/targets.js

import { ref, computed, nextTick } from 'vue';
import { defineStore, storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
@atomjoy
atomjoy / Stripe-Signature-Php.md
Last active October 19, 2025 08:10
Creating a Stripe notification header signature in PHP.

Stripe Header Signature

How to create a Stripe notification header signature in PHP and test it in Laravel.

Create Signature

Stripe signature: 't=timestamp,v1=signature,v0=none',

<?php
@atomjoy
atomjoy / OBS-Browser-Custom-Animations.md
Last active October 9, 2025 11:58
OBS Customizable html animations from a browser source.

OBS Browser Custom Html Animations

OBS Customizable animations from a browser source (!!! jedźiemy !!!).

How to use

Download to pulpit, unzip file, run html file with 2 clicks then copy url from browser to OBS Browser source and set resolution to 1920x 1080px.

@atomjoy
atomjoy / Zaokrąglanie-Vat.md
Last active October 4, 2025 08:46
Zaokrąglanie podatku Vat do 1 grosza.

Zaokrąglanie Vat

Kwoty wykazane w fakturze zaokrągla się zawsze do pełnych groszy. Końcówki poniżej 0,5 grosza pomija się, natomiast końcówki od 0,5 grosza i więcej zaokrągla się do 1 grosza.

// Tak ma być
$tax = 17.23;
$tax = 17.23499;
$tax = 17.734956; // Powinno być 17.73 zostawiamy 17.734 i zaokrąglamy czyli 17.73
echo number_format($tax, 2) . "</br>";