This file contains hidden or 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 | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
This file contains hidden or 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 | |
if (!function_exists('get_avatar')) { | |
function get_avatar ($email, $size = 32, $default = 'mp') { | |
return 'https://www.gravatar.com/avatar/' . md5($email) . '?' . http_build_query( [ 's' => $size, 'd' => $default ] ); | |
} | |
} |
This file contains hidden or 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 | |
// File: app/Exceptions/Handler.php | |
namespace App\Exceptions; | |
use Exception; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
class Handler extends ExceptionHandler | |
{ |
This file contains hidden or 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
// Plugin URL: https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy | |
{ | |
"files.exclude": { | |
"**/wp-admin": true, | |
"**/wp-includes": true | |
}, | |
"deploy": { | |
"openOutputOnDeploy": false, | |
"showPopupOnSuccess": true, |
This file contains hidden or 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 | |
$href = 'https://in.pinterest.com/bhagyashrijadhav51/happy/?utm_campaign=rdboards&e_t=5c7cb45aadb34115ba86ab4531b61a23&utm_content=733664664235398280&utm_source=31&utm_term=3&utm_medium=2004'; | |
$query_str = parse_url($href, PHP_URL_QUERY); | |
parse_str($query_str, $query_params); | |
echo $query_params['utm_campaign']; |
This file contains hidden or 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
// Source: https://blog.logrocket.com/beyond-cookies-todays-options-for-client-side-data-storage/ | |
const apiRequest = new Request('https://www.example.com/items'); | |
caches.open('exampleCache') // opens the cache | |
.then(cache => { | |
cache.match(apiRequest) // checks if the request is cached | |
.then(cachedResponse => | |
cachedResponse || // return cachedReponse if available | |
fetch(apiRequest) // otherwise, make new request | |
.then(response => { |
This file contains hidden or 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
/* list of characters */ | |
let count = 0; | |
document.querySelector('button').addEventListener('click', (ev) => { | |
if (count < characters.length) { | |
let item = document.createElement('li'); | |
item.innerText = characters[count]; | |
document.querySelector('ul').appendChild(item); | |
item.scrollIntoView({behavior: 'smooth'}); | |
This file contains hidden or 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
$.getScript( "https://cdn.datatables.net/plug-ins/1.10.19/api/processing().js", function( data, textStatus, jqxhr ) { | |
$("#company_list").DataTable().processing( true ); | |
}); |
This file contains hidden or 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 | |
//====================================================================== | |
// Add post state to the projects page | |
//====================================================================== | |
add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 ); | |
function ecs_add_post_state( $post_states, $post ) { |
This file contains hidden or 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
{ | |
"wp.theme": { | |
"prefix": "wp.theme", | |
"body": [ | |
"/*", | |
"Theme Name: $1", | |
"Theme URI: $2", | |
"Author: $3", | |
"Author URI: $4", | |
"Description: $5", |
NewerOlder