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
// Author: Sharry Stowell | |
// Date: 13/10/2023 | |
import { | |
app, | |
HttpRequest, | |
HttpResponseInit, | |
InvocationContext, | |
} from "@azure/functions"; |
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
// I'M USING THE 'BRINE' THEME & GBP CURRENCY | |
// REMEMBER TO PLACE THE FOLLOWING IN THE HEADER (https://x.squarespace.com/config/settings/advanced/code-injection) | |
///////////////////////////////////////////////////////////////////////////////////// | |
<script type="application/javascript" async src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY_HERE"></script> | |
<script>var _learnq = _learnq || [];</script> | |
// FOLLOWING PART IS PLACED IN A <CODE> BLOCK IN THE ADDITIONAL-INFO SECTION ON PRODUCT EDIT PAGE | |
/////////////////////////////////////////////////////////////////////////////////////// |
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
app.get('/user/status/:id', User.status); | |
userStatus - determines the status of the user: | |
blocked, | |
over quota, | |
logged on, |
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
API v3 known endpoints: | |
[GET with SESSION] | |
https://SUBDOMAIN.api-us1.com/api/3/tags | |
https://SUBDOMAIN.api-us1.com/api/3/tags/1 | |
https://SUBDOMAIN.api-us1.com/api/3/contacts | |
https://SUBDOMAIN.api-us1.com/api/3/contacts/7 | |
https://SUBDOMAIN.api-us1.com/api/3/deals |
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
%HEADERNAV% | |
%PAGECONTENT% | |
%FOOTER% | |
<script> | |
var sitename = "%SITEURL%"; | |
sitename = sitename.replace(".activehosted.com", "").replace("https://", ""); | |
sitename = sitename.replace(".primaryDomain.com", "").replace("http://", ""); | |
var email = "%USEREMAIL%"; |
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
/* | |
Example from: | |
https://www.cloudamqp.com/blog/2016-02-05-rabbitmq_delayed_message_exchange_plugin_with_node_js.html | |
BY LOVISA JOHANSSON POSTED 2016-02-05 | |
*/ | |
var amqp = require('amqplib/callback_api'); | |
var amqpConn = null; |
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
## from example: https://github.com/ibmjstart/Microservices/tree/split ## | |
productapi: | |
build: ./services/productAPI | |
ports: | |
- "49760:8080" | |
cartapi: | |
build: ./services/cartAPI | |
ports: |
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 http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Quaderno.js for One-off Charges on Stripe</title> | |
<!-- The required libs --> | |
<script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
<script type="text/javascript" src="https://js.quaderno.io/v2/"></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
# NODEJS express on port 3001 | |
upstream nodeapp { | |
server IPADDRESS:3001; | |
} | |
# NGINX Server Instance | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/path/to/website; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder