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 | |
namespace App\Repositories\Post; | |
use App\Post; | |
class EloquentPostRepository implements PostRepositoryInterface | |
{ | |
protected $model; |
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
/* Revisions, behave yourselves */ | |
define('AUTOSAVE_INTERVAL', 120 ); // Default value is 60 seconds. | |
define('WP_POST_REVISIONS', 3); // Number of revisions to save. |
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
/* Store in your theme under admin/assets/css or update spotify-embed.php */ | |
.spotify-embed-track { | |
width: 100%; | |
margin: auto; | |
} | |
.spotify-embed-track label > span { | |
display: block; | |
float: left; |
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
<!--[if gte IE 9]> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<![endif]--> | |
<!--[if lt IE 9]> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" /> | |
<![endif]--> |
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
function print_r(arr) { | |
if( arr.constructor == Array || arr.constructor == Object ) { | |
document.write('<ul>'); | |
for( var p in arr ) { | |
if( arr[p].constructor == Array || arr[p].constructor == Object ) { | |
document.write('<li>['+p+'] => '+typeof(arr)+'</li>'); | |
document.write('<ul>'); | |
print_r(arr[p]); |
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
str.replace(/<\/?[^>]+>/gi, '') |
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
$('a').each(function(){ | |
var url = $(this).attr('href'); | |
var element = $(this); | |
$.getJSON("http://json-tinyurl.appspot.com/?&callback=?", {url: url}, function(data){ | |
$(element).attr('href', data.tinyurl); | |
}); | |
}); |