This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
echo .DS_Store >> .gitignore | |
git add .gitignore | |
git commit -m '.DS_Store dosyaları kaldırıldı!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET", | |
"HEAD", | |
"PUT", | |
"POST", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This method logically validates Turkish VAT number | |
* | |
* @param string $taxNumber | |
* @return bool | |
*/ | |
public function validateTaxNumber(string $taxNumber): bool | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bu işlem için farklı yöntemler kullanılabilir ancak en yaygın yöntemlerden biri, kullanıcının siteye ilk girdiğinde bir cookie oluşturarak ve modal'ın yalnızca cookie mevcut olmadığında gösterilmesini sağlamaktır. | |
İşlem adımları aşağıdaki gibi olabilir: | |
İlk olarak, modal'ın açılıp açılmadığını kontrol eden bir koşul oluşturun. Bu koşul, genellikle bir JavaScript fonksiyonu içinde yer alır. | |
Daha sonra, cookie'nin var olup olmadığını kontrol eden bir fonksiyon yazın. Eğer cookie mevcut değilse, modal'ı açmak için koşulu true yapın ve ayrıca cookie'yi oluşturun. | |
Eğer cookie varsa, koşulu false yaparak modal'ın açılmamasını sağlayın. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How Responsive Display Works in Bootstrap 4 Beta | |
// Extra small devices (portrait phones, less than 576px) | |
default (max-width: 575px) | |
// Small devices (landscape phones, 576px and up) | |
(sm) small (min-width: 576px) and (max-width: 767px) | |
// Medium devices (tablets, 768px and up) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Non-www to www URLs 301 Redirect | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^ozkanozcan.com$ | |
RewriteRule (.*) http://www.ozkanozcan.com/$1 [R=301,L] | |
</IfModule> | |
# www to non-www URLs 301 Redirect | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
# That was ONLY to protect you from 500 errors | |
# if your server did not have mod_rewrite enabled | |
RewriteEngine On | |
# RewriteBase / | |
# NOT needed unless you're using mod_alias to redirect | |
RewriteCond %{REQUEST_URI} !/public | |
RewriteRule ^(.*)$ public/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function slugify($text, string $divider = '-') | |
{ | |
// replace non letter or digits by divider | |
$text = preg_replace('~[^\pL\d]+~u', $divider, $text); | |
// transliterate | |
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); | |
// remove unwanted characters | |
$text = preg_replace('~[^-\w]+~', '', $text); |
NewerOlder