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
*******HOMEPAGE | |
import { Component, h } from '@stencil/core'; | |
@Component({ | |
tag: 'app-home', | |
styleUrl: 'app-home.css' | |
}) | |
export class AppHome { |
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
<ion-item> | |
<ion-label>Sort Method</ion-label> | |
<ion-select value="recent"> | |
<ion-select-option value="recent">Most Recent</ion-select-option> | |
<ion-select-option value="location">Location</ion-select-option> | |
</ion-select> | |
</ion-item> | |
<ion-list-header> | |
<ion-label> |
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
RewriteEngine On | |
# If we receive a forwarded http request from a proxy... | |
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR] | |
# ...or just a plain old http request directly from the client | |
RewriteCond %{HTTP:X-Forwarded-Proto} ="" | |
RewriteCond %{HTTPS} !=on | |
# Redirect to https version |
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 | |
/** | |
* Sign a private asset url on cloudfront | |
* | |
* @param $resource full url of the resources | |
* @param $timeout timeout in seconds | |
* @return string signed url | |
* @throws Exception | |
*/ |
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
var fs = require('fs'); | |
var httpProxy = require('http-proxy'); | |
var http = require('http'); | |
var https = require('https'); | |
var express = require('express'); | |
var app = express(); | |
app.use(function (req, res, next) { | |
console.log(req); | |
if (req.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
# ----------------------------------------------------------------- | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged | |
# | |
# To stop tracking a file that is currently tracked, use | |
# git rm --cached |
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
/** | |
* Save the image on the server. | |
*/ | |
function save_image( $base64_img, $title ) { | |
// Upload dir. | |
$upload_dir = wp_upload_dir(); | |
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR; | |
$img = str_replace( 'data:image/jpeg;base64,', '', $base64_img ); |
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, lon1, lat2, lon2, unit) { | |
if ((lat1 == lat2) && (lon1 == lon2)) { | |
return 0; | |
} | |
else { | |
var radlat1 = Math.PI * lat1/180; | |
var radlat2 = Math.PI * lat2/180; | |
var theta = lon1-lon2; | |
var radtheta = Math.PI * theta/180; | |
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); |
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
"headers": [ | |
{ | |
"source": "/build/app/**", | |
"headers": [ | |
{ | |
"key": "Link", | |
"value": "public, max-age=31536000" | |
} | |
] | |
}, |