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
/** | |
* Mobile swipe | |
*/ | |
var swipeFunc = { | |
touches: { | |
"touchstart": {"x": -1, "y": -1}, | |
"touchmove": {"x": -1, "y": -1}, | |
"touchend": false, | |
"direction": "undetermined" | |
}, |
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
<ng-count-up from="0" to="2500" decimals="1" duration="2" delay="500" options="options"></ng-count-up> |
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 sortByKey(array, key) { | |
return array.sort(function(a, b) { | |
var x = a[key]; var y = b[key]; | |
return ((x < y) ? -1 : ((x > y) ? 1 : 0)); | |
}); | |
} |
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
xcrun instruments -w "iPhone 6 Plus (8.1 Simulator) [131B0452-EF78-4DC3-958E-88BB38DF479A]" | |
xcrun instruments -w "Resizable iPad (8.1 Simulator) [D412049F-CC28-41E5-904C-00D9E8BCAC4E]" | |
xcrun instruments -w "Resizable iPhone (8.1 Simulator) [5CBE2A07-2444-4B0F-B784-844135DA6276]" | |
xcrun instruments -w "iPad 2 (8.1 Simulator) [11E7311B-C808-4C3A-BBA2-C0C8C02C4E97]" | |
xcrun instruments -w "iPad Air (8.1 Simulator) [6F48D344-ADF7-433D-96D2-0AF429F73E5E]" | |
xcrun instruments -w "iPad Retina (8.1 Simulator) [AD15675B-75A6-4C55-B955-6407141811EF]" | |
xcrun instruments -w "iPhone 4s (8.1 Simulator) [405848FD-3551-48A4-A02F-FE07F3C9EE38]" | |
xcrun instruments -w "iPhone 5 (8.1 Simulator) [C6ABF7B4-C8B9-4923-9AF2-CF919FCA44CE]" | |
xcrun instruments -w "iPhone 5s (8.1 Simulator) [A47D3115-A86E-4826-BF9D-661C63D8CFE7]" | |
xcrun instruments -w "iPhone 6 (8.1 Simulator) [A0FBE72B-E8AE-475F-84F1-545DB3F29AFA]" |
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
#!/usr/bin/env python | |
import os | |
import errno | |
def path_hierarchy(path): | |
hierarchy = { | |
'name': os.path.basename(path), | |
'icon': path, | |
} |
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 | |
$productModel = Mage::getModel('catalog/product'); | |
$int_attr_id = 1337; // Get attr by ID | |
$attr = Mage::getModel('catalog/resource_eav_attribute')->load($int_attr_id); | |
$attributeValue = $_product->getResource()->getAttribute($attr->getAttributeCode())->getFrontend()->getValue($_product); | |
var_dump($attributeValue); | |
?> |