Skip to content

Instantly share code, notes, and snippets.

View aliaramli's full-sized avatar
🎯
Focusing

alia aliaramli

🎯
Focusing
  • Malaysia
View GitHub Profile
# Compressing file using Gz
tar -czvf mywebsite.tar.gz /var/www/mywebsite
# Compressing file using Zip (more Windows friendly)
zip -r mywebsite.zip /var/www/foodahlite
gdrive push -destination F_EOL/WEBSITE mywebsite.*
$(function() {
// add input listeners
google.maps.event.addDomListener(window, 'load', function () {
var from_places = new google.maps.places.Autocomplete(document.getElementById('from_places'));
var to_places = new google.maps.places.Autocomplete(document.getElementById('to_places'));
google.maps.event.addListener(from_places, 'place_changed', function () {
var from_place = from_places.getPlace();
var from_address = from_place.formatted_address;
$('#origin').val(from_address);
var delivery_rate = 0.8;
var delivery_charge = 3;
if (distance_in_kilo >3){
delivery_charge = distance_in_kilo * delivery_rate;
delivery_charge = Math.round(delivery_charge.toFixed(2)*10)/10;
}
<?php
/** Template Name: Page Delivery Calculator
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package WordPress
* @subpackage Storefront Child