Skip to content

Instantly share code, notes, and snippets.

View ismailalabou's full-sized avatar
🎯
Focusing

Ismail ALABOU ismailalabou

🎯
Focusing
View GitHub Profile
@codingphasedotcom
codingphasedotcom / custom-sessions.js
Created October 21, 2021 18:04
Shopify APP CLI MYSQL Prisma Custom Session Storage
import { PrismaClient } from '@prisma/client';
import Shopify from '@shopify/shopify-api';
import { Session } from '@shopify/shopify-api/dist/auth/session';
const prisma = new PrismaClient();
module.exports.storeCallback = async function storeCallback(session){
console.log('Running storeCallback')
const payload = { ...session }
@ismailalabou
ismailalabou / install-comodo-ssl-cert-for-nginx.rst
Created March 6, 2021 16:52 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@ismailalabou
ismailalabou / eslint_prettier_airbnb.md
Created December 28, 2020 13:44 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@chris-geelhoed
chris-geelhoed / ProductList.js
Created June 15, 2020 00:29
How to Paginate Results with Shopify's GraphQL API
import axios from 'axios'
import React from 'react'
import {
Stack,
Thumbnail,
TextStyle,
Card,
Pagination,
Spinner,
TextContainer
@sudojunior
sudojunior / gitloghelp.txt
Created October 24, 2019 20:10
The summary of less commands for git (direct copy from cmd-line).
SUMMARY OF LESS COMMANDS
Commands marked with * may be preceded by a number, N.
Notes in parentheses indicate the behavior if N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 30, 2024 08:44
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@bradtraversy
bradtraversy / vsc_js_snippets.json
Last active December 8, 2022 03:34
VSCode JavaScript Snippets
{
"Console Log": {
"prefix": "cl",
"body": "console.log($1);",
"description": "Console Log"
},
"Named Function": {
"prefix": "nfn",
"body": ["function ${1:functionName}($2) {", " $3", "}"],
"description": "Named Function"
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples