Skip to content

Instantly share code, notes, and snippets.

View Nurzzzone's full-sized avatar

Nurdaulet Abilgaziyev Nurzzzone

View GitHub Profile
(function( $ ) {
String.prototype.toDate = function(format)
{
var normalized = this.replace(/[^a-zA-Z0-9]/g, '-');
var normalizedFormat= format.toLowerCase().replace(/[^a-zA-Z0-9]/g, '-');
var formatItems = normalizedFormat.split('-');
var dateItems = normalized.split('-');
var monthIndex = formatItems.indexOf("mm");
var dayIndex = formatItems.indexOf("dd");
@Nurzzzone
Nurzzzone / laravel-docker-entrypoint.sh
Created December 18, 2024 12:06 — forked from mrofisr/laravel-docker-entrypoint.sh
Docker Entrypoint Script for Laravel Application
#!/bin/sh
# Function to check MySQL connection using telnet
check_mysql_connection() {
source /var/www/.env
telnet $DB_HOST $DB_PORT > /dev/null 2>&1
return $?
}
# Set environment variables
@Nurzzzone
Nurzzzone / guzzle_pool_example.php
Created March 28, 2023 06:38 — forked from wzed/guzzle_pool_example.php
GuzzleHttp\Pool example: identifying responses to concurrent async requests
<?php
/*
* Using a key => value pair with the yield keyword is
* the cleanest method I could find to add identifiers or tags
* to asynchronous concurrent requests in Guzzle,
* so you can identify which response is from which request!
*/
$client = new GuzzleHttp\Client(['base_uri' => 'http://httpbin.org']);
  1. Расскажите о проекте, которым по-настоящему гордитесь. Что вы сделали для его успешной реализации?

  2. Расскажите о проекте, который вас разочаровал. Что бы вы сейчас изменили при работе над ним?

  3. Что такое SPA и как сделать его SEO-friendly?

Single Page Application - это реализация веб-приложения таким образом, чтобы при первой загрузке пользователь получал все ресурсы, необходимые для того, чтобы избавиться от загрузки страницы с нуля при совершении интерактивных действий с интерфейсом.

Основную роль в SPA играет JavaScript, реализующий механизмы динамического

@Nurzzzone
Nurzzzone / domain.com
Created October 26, 2022 05:57 — forked from nmfzone/domain.com
NginX SSL Config for Laravel/Lumen using Let's Encrypt
server {
listen 80;
listen [::]:80;
server_name domain.com;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
}
@Nurzzzone
Nurzzzone / ExtendedReflectionClass.php
Created July 9, 2022 10:15 — forked from Zeronights/ExtendedReflectionClass.php
PHP: Getting use statements and aliases from class
<?php
/**
* The MIT License (MIT)
*
* Copyright (c) Ozgur (Ozzy) Giritli <ozgur@zeronights.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@Nurzzzone
Nurzzzone / solid-i.php
Created February 25, 2022 09:08
PHP solid принцип разделения интерфейса Interface segregation principle, ISP
// ITransformer.php
<?php
/**
* Solid
* I - принцип разделения интерфейса
* Interface segregation principle, ISP
* Клиенты не должны зависеть от методов, которые они не используют
*
* Много специализированных интерфейсов лучше, чем один универсальный
*/
@Nurzzzone
Nurzzzone / solid-l.php
Created February 25, 2022 09:07
PHP solid принцип подстановки Барбары Лисков Liskov substitution principle, LSP
// index.php
<?php
/**
* Solid
* L - принцип подстановки Барбары Лисков
* Liskov substitution principle, LSP
* Функции, которые используют базовый тип, должны
* иметь возможность использовать подтипы базового типа не зная об этом.
*
* Поведение наследуемых классов не должно противоречить
@Nurzzzone
Nurzzzone / git-ignore-line.sh
Created October 21, 2021 10:54 — forked from aryelgois/git-ignore-line.sh
Git filter to ignore lines in your files
#!/bin/sh
# Git filter to ignore lines in your files.
#
# Copyright (c) 2017-2019 Aryel Mota Góis <aryel.gois@gmail.com>
#
# MIT License
#
#
# SETUP:
#
@Nurzzzone
Nurzzzone / Locale.php
Created June 28, 2021 05:38 — forked from ashour/Locale.php
A simple Locale library for Laravel
<?php
namespace App;
class Locale
{
/**
* Cached copy of the configured supported locales
*
* @var string