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
public function slipstream_ad_content($content) | |
{ | |
if(!is_single() || get_post_type() == 'lp' || get_post_type() == 'got') | |
return $content; | |
global $agora_core, $dr_theme, $afp_openx; | |
$openx_script = (is_object($afp_openx)) ? $afp_openx->openx_script(array('zoneid' => $dr_theme->openx_635x120_zoneid)) : ''; | |
$paragraphs = str_replace('</p>', '', $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
{ | |
// The tab key will cycle through the settings when first created | |
// Visit http://wbond.net/sublime_packages/sftp/settings for help | |
// sftp, ftp or ftps | |
"type": "sftp", | |
"save_before_upload": true, | |
"upload_on_save": true, | |
"sync_down_on_open": 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
// sort the table after window object is done loading | |
jQuery(window).ready(function($){ | |
var $ = jQuery; | |
// sort Portfolio table by the portfolio group | |
sort_portfolio_group(); | |
}); | |
// sort the portfolio by group and by the selected sorting order | |
function sort_portfolio_group(){ | |
var $ = jQuery; |
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
# http://nicolasleroy.be/blog/vagrant-error | |
vagrant halt // As the machine will have booted, even with the error above | |
rm -rf /etc/exports // Remove the exports file. | |
vagrant up // Let's try again, fingers crossed |
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 | |
/* | |
Output a list of numbers multiple times depending on their value (e.g. output 9 nine times, or 18 eighteen times). Works well if it doesn't matter if you listall the numbers preceding the last number | |
*/ | |
$array = array(1,2,3,4,5,6,7,8,9,12,18); | |
foreach ($array as $num) { | |
$string = ''; | |
$count = 1 * $num; | |
for ($i=0;$i < $count; $i++) { |
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 disqus_forum_users.forum_id, COUNT(disqus_forum_users.forum_id) AS `count`, disqus_forums.description, website FROM disqus_forum_users LEFT JOIN disqus_forums ON disqus_forums.forum_id = disqus_forum_users.forum_id WHERE disqus_forum_users.forum_id != "dailyreckoning" GROUP BY forum_id ORDER BY count DESC; |
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
mysqldump -u db_user -p db_password -h db_host --add-drop-table --no-data db_name | grep ^DROP | mysql -u db_user -p db_password -h db_host db_name |
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 | |
/** | |
* Get the excerpt of a paragraph or string of long text. | |
* | |
* Get the shortened version of text for the wyisiwig. Use with custom wysiwyg (e.g. Advanced Custom Fields). This will print the paragraph and breaks tag but will strip all other tags | |
* | |
* @since 2014-11-06 | |
* @version 2016-03-09 | |
* @author De'Yonte W.<[email protected]> |
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
doskey wp=php D:\devtools\wp-cli\wp-cli.phar |
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
#place above all other rewrite rules if using a cms or program that redirects all request to index.php file (e.g. WordPress, Drupal, Laravel, etc...) | |
#if a file or directory does not exist on the local host, 302 redirect the request to the production host so the browser doesn't cache the file in case you replace the file locally | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#Redirect WordPress uploads | |
#Prevent infinite redirect. Only apply this if not on any subdomains of the live domain. Comment out line if not needed | |
RewriteCond %{HTTP_HOST} !^(.*)example\.com | |
#Prevent infinite redirect. Only apply this if not on the root domain of the live domain. Uncomment line if needed | |
#RewriteCond %{HTTP_HOST} !^example\.com [NC] | |
#Prevent infinite redirect. Only apply this if not on the www version of the exact domain of the live domain. Uncomment line if needed |