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
String.prototype.turkishToUpper = function(){ | |
var string = this; | |
var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" }; | |
string = string.replace(/(([iışğüçö]))/g, function(letter){ return letters[letter]; }); | |
return string.toUpperCase(); | |
}; | |
String.prototype.turkishToLower = function(){ | |
var string = this; | |
var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" }; |
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
/** | |
* Disable auto creation of the available image sizes on Wordpress | |
* | |
* See: https://developer.wordpress.org/reference/hooks/intermediate_image_sizes_advanced/ | |
*/ | |
add_filter('intermediate_image_sizes_advanced', 'bymega_filter_image_sizes'); | |
function bymega_filter_image_sizes ($sizes) { | |
// Example: disable auto creation of the size medium_large | |
unset( $sizes['medium_large'] ); |
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
1) php artisan make:middleware LogLastUserActivity | |
2) app/Http/Middleware/LogLastUserActivity.php | |
if(Auth::check()) { | |
$expiresAt = Carbon::now()->addMinutes(5); | |
Cache::put('user-is-online-' . Auth::user()->id, true, $expiresAt); | |
} | |
3) app/Http/Kernel.php | |
protected $middlewareGroups = [ | |
'web' => [ | |
\App\Http\Middleware\EncryptCookies::class, |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
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 | |
/** | |
* Include posts from authors in the search results where | |
* either their display name or user login matches the query string | |
* | |
* @author danielbachhuber | |
*/ | |
add_filter( 'posts_search', 'db_filter_authors_search' ); | |
function db_filter_authors_search( $posts_search ) { |
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 | |
/** | |
* Created by PhpStorm. | |
* User: ferdiunal | |
* Date: 19.06.2016 | |
* Time: 14:35 | |
*/ | |
return[ | |
/*** | |
* Turkey - Türkiye |
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 | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
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
<style> | |
.strikethrough { | |
position: relative; | |
} | |
.strikethrough:before { | |
position: absolute; | |
content: ""; | |
left: 0; | |
top: 50%; | |
right: 0; |
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
var a = "bymega.com"; | |
var temp = new Array(); | |
temp = a.split('.'); | |
console.log(temp); |
NewerOlder