- Initial
node.jspackage manager withnpmoryarnby running
yarn init -y
#or
npm init -y| <?php | |
| /* | |
| The aim is to create a functional server monitor based on the one | |
| showed on Mark Zuckerberg's monitor on The Social Network movie. | |
| Run so: | |
| php monitor.php | |
| Notes: | |
| - The server LogFormat must be "Common Log Format" (%h %^[%d:%^] "%r" %s %b) |
| <h2>All Product Images</h2> | |
| {% for product in collections['all'].products %} | |
| <p><a href="/admin/products/{{product.id}}" target="_blank">{{product.title}}</a></p> | |
| {% for image in product.images %} | |
| <p><img src="{{ image.src | product_img_url: "large" }}"></p> | |
| {% endfor %} | |
| {% endfor %} |
| function (user, context, callback) { | |
| user.app_metadata = user.app_metadata || {}; | |
| if ('stripe_customer_id' in user.app_metadata) { | |
| context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id; | |
| return callback(null, user, context); | |
| } | |
| var stripe = require('stripe')('sk_....'); | |
| var customer = { |