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 | |
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); | |
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode(); | |
$price = 200; | |
// convert price from base currency to current currency | |
$priceTwo = Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $currentCurrencyCode); | |
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
/** | |
* Created by Praneeth Nddarshan on 10/25/2016. | |
*/ | |
var from_date = '2016-01-01'; | |
var to_date = '2016-02-20'; | |
var dates = getDates(from_date, to_date); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="description" content="Moment JS clock for beginners."> | |
<meta name="keywords" content="HTML,CSS,MOMENT, JAVASCRIPT, JQUERY, CLOCK, TIME"> | |
<meta name="author" content="Praneeth Nidarshan"> | |
<title>MOMENT CLOCK</title> | |
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> |
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 | |
class compareImages | |
{ | |
private function mimeType($i) | |
{ | |
/*returns array with mime type and if its jpg or png. Returns false if it isn't jpg or png*/ | |
$mime = getimagesize($i); | |
$return = array($mime[0],$mime[1]); | |
switch ($mime['mime']) |
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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
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 distance($lat1 = 0, $lng1 = 0, $lat2 = 0, $lng2 = 0, $miles = true) | |
{ | |
$pi80 = M_PI / 180; | |
$lat1 *= $pi80; | |
$lng1 *= $pi80; | |
$lat2 *= $pi80; | |
$lng2 *= $pi80; | |
$r = 6372.797; // mean radius of Earth in km | |
$dlat = $lat2 - $lat1; |