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/bash | |
################################################################################ | |
# Ubuntu fonts installation helper for Fedora Linux | |
# | |
# This script is installing the fonts without any untrustworthy RPMs or build- | |
# hazzle. I think it is useful because there is only a "ubuntu-title-fonts" | |
# package included in the main repositories right now. | |
# Please note that the yum/RPM database is bypassed, so you can't uninstall | |
# the fonts by using yum erase/remove. |
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
---------CRON JOB--------------------------------------------- | |
#Bestee Import Products and Categories From Amazon every 5 Hours | |
00 */05 * * * curl -s -m 10 http://inheritx.dnsdynamic.com:8590/bestee/job/ImportAmazonProducts > /dev/null 2>&1 | |
#Bestee Get The Score For Amazon Products After every 1 Hour | |
00 */01 * * * curl -s -m 10 http://inheritx.dnsdynamic.com:8590/bestee/job/TestFreakScoreMigration > /dev/null 2>&1 |
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
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); | |
function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); | |
?> | |
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a> |
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/bash | |
# | |
# SIV : System Information Viewer | |
# | |
# Author : Saikat Basak ([email protected]) | |
# | |
# **** License **** | |
# | |
# The software is distributed under "THE BEER-WARE LICENSE" (Revision 42) | |
# The Beer-ware license was written by Poul-Henning Kamp. <[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
function downloadJSAtOnload() { | |
var element = document.createElement("script"); | |
element.src = "defer.js"; | |
document.body.appendChild(element); | |
} | |
if (window.addEventListener) | |
window.addEventListener("load", downloadJSAtOnload, false); | |
else if (window.attachEvent) | |
window.attachEvent("onload", downloadJSAtOnload); |
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_action('wp_ajax_twitter_share', 'twitter_share', 0); | |
add_action('wp_ajax_nopriv_twitter_share', 'twitter_share'); | |
function twitter_share() { | |
$your_data = $_POST['your_data']; | |
echo $your_data; | |
die; | |
} |
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 function wp_login_form_frontend($args = array()) { | |
$defaults = array('echo' => true, | |
'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page | |
'form_id' => 'loginformfrontend', | |
'label_username' => __('Username'), | |
'label_password' => __('Password'), | |
'label_remember' => __('Remember Me'), | |
'label_log_in' => __('SIGN IN'), | |
'id_username' => 'user_login', | |
'id_password' => 'user_pass', |
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 function register_project_templates(){ | |
//Create the key used for the themes cache | |
$cache_key = 'page_templates-'.md5( get_theme_root().'/'.get_stylesheet()); | |
$templates = wp_get_theme()->get_page_templates(); | |
if( empty( $templates ) ) { | |
$templates = 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
<?php | |
add_action('admin_init', 'no_mo_dashboard'); | |
function no_mo_dashboard() { | |
if (!current_user_can('manage_options') && $_SERVER['DOING_AJAX'] != '/wp-admin/admin-ajax.php') { | |
wp_redirect(home_url()); exit; | |
} | |
} | |
?> |
OlderNewer