Skip to content

Instantly share code, notes, and snippets.

View ismailalabou's full-sized avatar
🎯
Focusing

Ismail ALABOU ismailalabou

🎯
Focusing
View GitHub Profile
@ismailalabou
ismailalabou / custom-sessions.js
Created March 16, 2022 00:26 — forked from codingphasedotcom/custom-sessions.js
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 }
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
@ismailalabou
ismailalabou / ProductList.js
Created June 23, 2021 15:56 — forked from chris-geelhoed/ProductList.js
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
@ismailalabou
ismailalabou / example.js
Created May 28, 2021 13:19 — forked from andrewwiik/example.js
Add Tracking Info to a PayPal Transaction
/**
Possible Carrier Codes:
- UPS
- USPS
- FEDEX
- AIRBORNE_EXPRESS
- DHL
- DHL_GLOBAL_ECOMMERCE
- US_ASCENDIA
- US_DTDC
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 3 columns, instead of 2. in line 3.
Basis of Comparision Spring Cloud Spring Boot
Library Spring Cloud has an open-source library. Spring Boot has an open-source library.
Microservices This is working for microservices to manage configuration. This is work to create microservices.
Features 1. Intelligent routing and service discovery: In creating microservices four services are important. Service discovery one of them. These services are dependent on each other.
2. Service-to-Service Call: To connect all dependent services has sequence, register to call the endpoint.
3. Load Balancing: It is proper distributed network traffic to the backend server.
4. Leadership Election: The application work with another application as a third-party system.
5. Global Lock: Two threads not access simultaneously the same resource at the same time.
6.Distributed Configuration and Distributed Messaging 1.Spring Applications: Create stand-alone Spring applications by calling a static run() method.
2.Web Application: We can create an HTTP server using embedded Tomc
@ismailalabou
ismailalabou / modes.tsv
Last active March 12, 2021 20:03
opensource
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 1 column, instead of 2. in line 3.
Mode Description
Normal Default; for navigation and simple editing
Insert For explicitly inserting and modifying text
Command Line For operations like saving, exiting, etc.
@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

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="funkopop" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/funkopop" />
<property name="javax.persistence.jdbc.user" value="admin" />
@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