Skip to content

Instantly share code, notes, and snippets.

View kvrushifa's full-sized avatar
🏠
Working from home

nico. kvrushifa

🏠
Working from home
View GitHub Profile
@vktr
vktr / rule.js
Created February 10, 2018 18:54
Add Stripe Customer Id to Auth0 via custom rule
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 = {
@svaustin66
svaustin66 / Shopify - All Product Photos
Created June 13, 2017 19:49
This liquid code will list all of the products in a store with links to the product admin page and show all product photos under each product
<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 %}
@jesobreira
jesobreira / monitor.php
Last active October 25, 2023 13:26
Server Monitor
<?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)