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
server { | |
listen 80; | |
server_name api.lakeandskye.test; | |
return 301 https://api.lakeandskye.test$request_uri; | |
} | |
server { | |
listen 80; | |
server_name cms.lakeandskye.test; | |
return 301 https://cms.lakeandskye.test$request_uri; |
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
server { | |
listen 80; | |
server_name api.commoncitizen.test; | |
return 301 https://api.commoncitizen.test$request_uri; | |
} | |
server { | |
listen 80; | |
server_name cms.commoncitizen.test; | |
return 301 https://cms.commoncitizen.test$request_uri; |
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
import Promise from 'bluebird' | |
import Cookies from 'js-cookie' | |
export const init = () => { | |
return Promise.map(window.vinoshipper.accounts, account => { | |
return $ | |
.get(`https://vinoshipper.com/json-api/v2/wine-list?id=${account.id}`) | |
.then(data => { | |
account.shipsTo = data.shipsTo | |
account.wines = data.wines |
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
<script type="text/javascript"> | |
var productsPurchased = []; | |
var orderTotal = 0; | |
{% for item in checkout.order.line_items %} | |
productsPurchased.push({ | |
product_id: '{{ item.variant_id }}', | |
product_name: '{{ item.title }}', | |
product_brand: '{{ item.vendor }}', | |
product_size: '{{ item.grams }}', | |
product_price: '{{ item.final_price }}', |
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
exports.userCreateProps = functions.auth.user().onCreate( (user) => { | |
const props = {}; | |
props["email"] = user.email; | |
if ( user.displayName ) { | |
props["displayName"] = user.displayName; | |
} | |
if ( user.phoneNumber ) { | |
props["phoneNumber"] = user.phoneNumber; |
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
{ | |
"development": { | |
"shopify_api_key":"[your key]", | |
"shopify_password":"[your password]", | |
"shopify_url":"[your dev shop url]", | |
"shopify_theme":"[the theme id to sync to]" | |
} | |
} |
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
NOTES! | |
This is the single html page to be loaded by phonegap. | |
The only elements to be hard coded are the initial host locations for the | |
css/js assets. Currently set to my rails app on the network. | |
(note, localhost won't work in development. Must be an explicit IP) | |
In a phonegap app, we have to explicitly declare a host for all ajax request. | |
This is because the main html page is not being served from a web server. |
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
$(document).ready(function() { | |
$('a').live('click', function (e) { | |
e.preventDefault(); | |
window.location = $(this).attr('href'); | |
}); | |
}); |
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
## NOTE | |
Class assumes event model includes start_date and end_date, | |
both of type 'datetime'. | |
You can init the class with a hash of options. | |
There are two options options at this point, 'month_format', | |
and 'date_format' which accept Ruby's 'strftime' style strings. |
NewerOlder