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 | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* @name Spintax | |
* @author Jason Davis - https://www.codedevelopr.com/ | |
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/ | |
*/ | |
class Spintax | |
{ | |
public function process($text) |
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 | |
/** | |
* Response Code Multi Curl | |
* @param array $urls list url | |
* @return array | |
*/ | |
function checkHttpCode($urls) { | |
$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; |
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
//Go to any page with pins (a board, your pins, search results, etc) and open JavaScript Console (Ctrl+Shift+J on windows OR option+command+J on mac) and paste in this code: | |
//sort by repins, adjust amount of pins/pages you want to collect first | |
var pages = 5; | |
var count = 0; | |
var mylist = []; | |
var timeout; | |
load(); | |
function load(){ |
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 | |
class DB { | |
private static $_MYSQL_HOST="localhost"; | |
private static $_MYSQL_USER="your_mysql_user"; | |
private static $_MYSQL_PASS="your_mysql_password"; | |
private static $_MYSQL_DB="your_mysql_database"; | |
private static $connect = null; |
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 | |
require '../simple_html_dom.php'; | |
function grab_html($url) | |
{ | |
$file = file_get_contents($url); | |
return $file; | |
} | |
// http://php.net/manual/en/book.dom.php#89718 |
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_filter( 'the_content', 'prefix_insert_post_ads' ); | |
function prefix_insert_post_ads( $content ) { | |
$ad_code = '<div id="googleads-1"></div>'; | |
if ( is_single() && ! is_admin() ) { | |
return prefix_insert_after_paragraph( $ad_code, 2, $content ); |
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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var count = 10; | |
var countdown = setInterval(function(){ | |
if (count == 0) { | |
clearInterval(countdown); | |
$('#googleads-1').load('http//www.example.com/ads/app/adsense.txt'); | |
$('#googleads-2').load('http//www.example.com/ads/app/adsense.txt'); | |
// adsense.txt contain your adsense code | |
} |
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
/** | |
* Insert an attachment from an URL address. | |
* | |
* @param String $url | |
* @param Int $post_id | |
* @param Array $meta_data | |
* @return Int Attachment ID | |
*/ | |
function crb_insert_attachment_from_url($url, $post_id = null) { |
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
{% comment %} | |
# | |
# I modified the original code from http://anjesh.github.io/2015/01/25/collection-pagination-working-github-pages/ | |
# | |
# Make a collection in _config.yml and create the folder _your_collection in your root. | |
# | |
# collections: | |
# your_collection: | |
# output: true | |
# permalink: /:collection/:title/ |
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
#/bin/sh | |
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output |
OlderNewer