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 palindrome(str) { | |
var text = str.replace(/[^0-9a-z]/gi, '').toLowerCase(), | |
reverseText = text.split("").reverse().join(""); | |
return text == reverseText; | |
} |
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 factorialize(num) { | |
var answer = 1; | |
for (var i = 2; i <= num; i++) { | |
answer *= i; | |
} | |
return answer; |
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 reverseString(str) { | |
return str.split("").reverse().join(""); | |
} | |
reverseString("hello") |
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
& when (@media-common = true) { | |
body:before { | |
background: rgba(0,0,0,.5); | |
color: #fff; | |
height: 18px; | |
line-height: 16px; | |
padding: 0 4px; | |
font-size: 12px; | |
position: fixed; | |
top: 50%; |
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 post_type_support_init() { | |
remove_post_type_support('post', 'custom-fields'); | |
remove_post_type_support('page', 'custom-fields'); | |
} | |
add_action('init', 'post_type_support_init'); |
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
/** | |
* Remove website field from comments | |
*/ | |
function disable_comment_url($fields) { | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','disable_comment_url'); |
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
<action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,700,300,600italic</href></action> |
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 /* Open Graph Protocol for Facebook and SEO START */ ?> | |
<?php if(Mage::registry('current_product')): ?> | |
<?php $product = Mage::registry('current_product'); ?> | |
<meta property="og:title" content="<?php echo ($product->getName()); ?>" /> | |
<meta property="og:type" content="product" /> | |
<meta property="og:image" content="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(200,200);?>" /> | |
<meta property="og:url" content="<?php echo Mage::registry('product')->getProductUrl(); ?>" /> | |
<meta property="og:description" content="<?php echo strip_tags(($product->getShortDescription())); ?>" /> | |
<meta property="og:site_name" content="<?php echo Mage::app()->getStore()->getName(); ?>" /> | |
<?php elseif(Mage::registry('current_category')): ?> |
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
<handler> | |
<reference name="root"> | |
<action method="addBodyClass"><classname>my-account</classname></action> | |
</reference> | |
</handler> |
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 $storePhone = Mage::getStoreConfig('general/store_information/phone'); ?> |
NewerOlder