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
WITH | |
custom_values AS ( | |
SELECT | |
location_id, | |
COALESCE( | |
JSONB_OBJECT_AGG(name, value) FILTER (WHERE name IS NOT NULL), | |
'{}' | |
) AS data | |
FROM custom_values | |
GROUP BY location_id |
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
#!/bin/bash | |
BUCKET="sgw-pd-t1" | |
PAGE_SIZE=10 | |
# Search and replace this key | |
NEW_META_KEY="file-permissions" | |
NEW_META_VALUE="0777" | |
# can manually set in case of script failure, new token is output every `PAGE_SIZE` requests. |
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. |
NewerOlder