View SquareSpaceProductToKlaviyoEvents.js
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 | |
/////////////////////////////////////////////////////////////////////////////////////// |
View gist:b5846e992f81b8171c87b40ad521268a
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, |
View activeCampaignAPI3.txt
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 |
View intercomOnAc.js
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%"; |
View x-delayed-type.js
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; |
View docker-compose.yml
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: |
View quaderno-charges-for-stripe.html
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> |
View Nginx config
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; |
View 0_reuse_code.js
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 |
View fourSquareAPI.js
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: James Shrager (@jshrager) | |
Intended use: Appcelerator Titanium | |
Usage: http://www.LearningTitanium.com (@learningTi) | |
*/ | |
var client_id = "YOUR_CLIENT_ID"; | |
var client_secret = "YOUR_CLIENT_SECRET"; | |
var redirectUri = 'http://YOUR_URL/foursquareCallback.php'; | |
var ui = require('ui/ui'); |