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
// File upload mask | |
$('.upload-masked').each(function(){ | |
var $this = $(this) | |
, $mask = $('<input type="text" class="upload-mask" value="" />'); | |
$this.wrap('<div class="input-wrap" style="position:relative;"></div>'); | |
$this.css({opacity:0,position:'absolute'}); | |
$this.after('<span class="upload-mask-button">BROWSE</span>'); | |
$this.after($mask); |
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
UPDATE `wp_posts` SET guid = REPLACE(guid,'*old_domain*','*new_domain*') WHERE `post_type` = 'attachment' |
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
^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,3})$ |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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
function xf_insert_image( $html, $id, $caption, $title, $align, $url ) | |
{ | |
$html5 = "<figure id='post-$id media-$id' class='align-$align'>"; | |
$html5 .= "<img src='$url' alt='$title' />"; | |
$html5 .= "<figcaption>$caption</figcaption>"; | |
$html5 .= "</figure>"; | |
return $html5; | |
} |
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 | |
// Let's see those errors! | |
error_reporting(1); | |
// Give it some time! | |
set_time_limit(80); | |
// File ext(types) to check! | |
$check_files = array( |
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
DELETE pm | |
FROM wp_postmeta pm | |
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id | |
WHERE wp.ID IS 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
# Below are some good links for reference | |
# https://gist.github.com/c4milo/940909 | |
# https://www.exratione.com/2013/02/nodejs-and-forever-as-a-service-simple-upstart-and-init-scripts-for-ubuntu/ | |
# http://upstart.ubuntu.com/cookbook/ | |
# http://serverfault.com/questions/321375/passing-arguments-to-upstart-job | |
author "Andres Hermosilla <[email protected]>" | |
description "Update Example Config" | |
# Set variables | |
env upstart_name=template |
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
<div class="col-half"> | |
<div class="input-block"> | |
<label>Subject*</label> | |
[text* c_subject] | |
</div> | |
<div class="input-block"> | |
<label>Company</label> | |
[text c_company] | |
</div> | |
<div class="input-block"> |
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
SELECT email, | |
COUNT(email) AS NumOccurrences | |
FROM users | |
GROUP BY email | |
HAVING ( COUNT(email) > 1 ) |
OlderNewer