Skip to content

Instantly share code, notes, and snippets.

View dejurin's full-sized avatar
💭
;-)

YURII D. dejurin

💭
;-)
  • Si-ɑR
  • București, România 🇷🇴
  • 03:44 (UTC +03:00)
View GitHub Profile
@dejurin
dejurin / docker-compose.yml
Created December 31, 2023 17:23
docker-compose.yml
version: "3.1"
services:
web:
image: wordpress:6.4-php8.1-apache
restart: always
volumes:
- ./wordpress:/var/www/html
- ./custom.ini:/usr/local/etc/php/conf.d/custom.ini
env_file:
@dejurin
dejurin / gradient.js
Created November 9, 2023 16:41
Gradient Collection
const gradients = [
{ name: "Blu", hex: ["#00416A", "#E4E5E6"] },
{ name: "Ver", hex: ["#FFE000", "#799F0C"] },
{ name: "Ver Black", hex: ["#F7F8F8", "#ACBB78"] },
{ name: "Combi", hex: ["#00416A", "#799F0C", "#FFE000"] },
{ name: "Anwar", hex: ["#334d50", "#cbcaa5"] },
{ name: "Bluelagoo", hex: ["#0052D4", "#4364F7", "#6FB1FC"] },
{ name: "Lunada", hex: ["#5433FF", "#20BDFF", "#A5FECB"] },
{ name: "Reaqua", hex: ["#799F0C", "#ACBB78"] },
{ name: "Mango", hex: ["#ffe259", "#ffa751"] },
import React from 'react';
import { useSessionStorage } from '@mantine/hooks';
export interface CFTrace {
status: string;
country: string;
countryCode: string;
region: string;
regionName: string;
city: string;
@dejurin
dejurin / comparison.md
Last active October 9, 2023 12:37
Comparison of Alpine, Slim, Stretch, Buster, Jessie, and Bullseye Linux Distributions
Characteristic Alpine Slim Stretch Buster Jessie Bullseye
Base operating system Alpine Linux Debian Debian Debian Debian Debian
Codename - - Stretch Buster
@dejurin
dejurin / create_env_file.sh
Last active October 7, 2023 12:35
Usage: $0 SOURCE_FILE OUTPUT_FILE
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 SOURCE_FILE OUTPUT_FILE"
exit 1
fi
# Template file with placeholders
TEMPLATE_FILE="env.tmpl"
@dejurin
dejurin / isEmptyArray.js
Created August 22, 2023 10:52
Array is Empty: benchmark ways
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite();
console.log('benchmark');
const emptyArray = [];
const nonEmptyArray = [1, 2, 3];
suite
@dejurin
dejurin / isEmptyObject.js
Last active August 22, 2023 10:51
Object is Empty: benchmark ways
const Benchmark = require('benchmark');
const isEmpty = require('lodash/isEmpty');
const suite = new Benchmark.Suite();
console.log('benchmark');
const emptyObj = {};
const nonEmptyObj = { key: 'value' };
@dejurin
dejurin / dateFormats.ts
Created August 19, 2023 09:23
Date Formats
const dateFormats: string[] = [
'yyyy-MM-dd',
'dd/MM/yyyy',
'd/MM/yyyy',
'dd.MM.yyyy',
'yyyy-M-d',
'd.M.yyyy',
'dd-MM-yyyy',
'MM/dd/yyyy',
'd.MM.yyyy',
@dejurin
dejurin / requirements.py
Created July 9, 2023 14:41
Python: Check new versions of packages
"""
# Check new versions of packages
$ pip list --outdated
# Install new packages
$ pip install -U package
# Save to file
$ pip freeze > requirements.txt
"""
@dejurin
dejurin / BreadcrumbsSimple.tsx
Created June 15, 2023 16:32
Mantine Breadcrumbs
import {
rem,
Text,
Breadcrumbs,
createStyles,
} from '@mantine/core';
import { IconChevronRight } from '@tabler/icons-react';
import Link from 'next/link';
const useStyles = createStyles((theme) => ({