Skip to content

Instantly share code, notes, and snippets.

View developertugrul's full-sized avatar
🏠
tugrulyildirim.com

Tuğrul Yıldırım (Full Stack Web Developer) developertugrul

🏠
tugrulyildirim.com
View GitHub Profile
@developertugrul
developertugrul / istiklal-marsi-notalari
Created July 10, 2024 15:16
İstiklal Marşı notalarının matematiksel olarak zaman ve frekansı kullanılarak grafik üzerinde gösterimi.
# Zaman aralıkları ve frekans değerlerini tekrar gözden geçirip düzenliyoruz
# Zaman aralıkları
time_intervals = [0, 0.5, 1, 2, 3, 3.5, 4, 5, 5.5, 6, 7, 8, 8.5, 9, 10, 10.5, 11, 12, 13, 13.5, 14, 15, 15.5, 16, 16.5, 17]
# Frekans değerleri
frequencies = [329.63, 369.99, 392.00, 440.00, 493.88, 523.25, 587.33, 523.25, 493.88, 440.00, 392.00, 369.99, 329.63, 293.66,
329.63, 369.99, 392.00, 440.00, 493.88, 523.25, 587.33, 523.25, 493.88, 440.00, 392.00, 369.99]
# Zaman ve frekans listelerinin uzunluklarının aynı olmasını sağla
# NVM'yi yükle
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
# Kabuğunu yeniden başlat veya aşağıdaki komutu çalıştır
source ~/.bashrc
# Yüklü Node.js sürümlerini kontrol et
nvm ls
# En son LTS (Uzun Süreli Destek) sürümünü yükle
product:elastic port:9200 country:tr
http://IP_ADDRESS:9200/_cat/indices?v
http://IP_ADDRESS:9200/users/_search?size=1000
<input type="text" className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" placeholder="123-456-7890" required/>
@developertugrul
developertugrul / Swal alert with custom HTML React
Created April 4, 2024 10:53
Swal alert with custom HTML React
const MySwal = withReactContent(Swal);
MySwal.fire({
title: t("products:imported_price_list"),
html: importedPriceList.map(item => {
return `<div>${item.product_code} - ${item.priceList.map(price => `${price.id}: ${price.price}`).join(", ")}</div>`;
}).join("")
});
location / {
try_files $uri $uri/ @extensionless-php;
index index.html index.htm index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@developertugrul
developertugrul / router.jsx
Created August 10, 2023 10:38
another way to set router in react
import {
createBrowserRouter,
createRoutesFromElements,
RouterProvider,
Route,
Outlet
} from "react-router-dom"
import HomeComponent from "./home"
import AboutComponent from "./about"
@developertugrul
developertugrul / shake_animation_button
Created August 5, 2023 13:28
a sahke animation for a button
.non-animated-btn-btn:hover {
transform: scale(1.05);
animation: svelte-k9qwtc-jittery 4s infinite;
}
@keyframes svelte-k9qwtc-jittery {
5%,
50% {
# Define upstream blocks for each microservice
upstream user_service {
server user-service-container-ip:8001; # Replace with the IP address of the user-service container and its actual port
}
upstream product_service {
server product-service-container-ip:8002; # Replace with the IP address of the product-service container and its actual port
}
upstream order_service {
@developertugrul
developertugrul / wordpress_htaccess_file
Created December 8, 2022 06:38
wordpress htaccess file
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]