This file contains hidden or 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
version: '3.3' | |
services: | |
rabbitmq: | |
image: rabbitmq:3-management | |
ports: | |
- 5672:5672 | |
- 9000:15672 | |
environment: | |
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER} |
This file contains hidden or 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
RABBITMQ_DEFAULT_USER=admin | |
RABBITMQ_DEFAULT_PASS=admin | |
This file contains hidden or 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
//SetupRoutes : gin router | |
func SetupRoutes() { | |
httpRouter := gin.Default() | |
//handling CORS | |
httpRouter.Use(cors.New(cors.Config{ | |
AllowOrigins: []string{"*"}, | |
AllowMethods: []string{"PUT", "PATCH", "GET", "POST", "OPTIONS", "DELETE"}, | |
AllowHeaders: []string{"*"}, | |
AllowCredentials: true, |
This file contains hidden or 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
var RabbitChannel *amqp.Channel | |
var rabbitConn *amqp.Connection | |
//SetupRabbbitMQConnectionChannel -> setup rabbit mq channel | |
func SetupRabbbitMQConnectionChannel() (*amqp.Connection, *amqp.Channel) { | |
//dial | |
url := fmt.Sprintf("amqp://%s:%s@%s:%s/", constants.USERNAME, constants.PASSWORD, constants.HOST, constants.PORT) | |
conn, err := amqp.Dial(url) |
This file contains hidden or 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
order {"id":4592779886789,"admin_graphql_api_id":"gid:\/\/shopify\/Order\/4592779886789","app_id":580111,"browser_ip":"209.152.96.166","buyer_accepts_marketing":false,"cancel_reason":null,"cancelled_at":null,"cart_token":"21517eef15cfeffec7793325f20a35f6","checkout_id":28856304074949,"checkout_token":"9e50530363383313809c40fa29225081","client_details":{"accept_language":"en-US,en;q=0.6","browser_height":null,"browser_ip":"209.152.96.166","browser_width":null,"session_hash":null,"user_agent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/107.0.0.0 Safari\/537.36"},"closed_at":null,"confirmed":true,"contact_email":null,"created_at":"2022-11-07T11:09:18-05:00","currency":"USD","current_subtotal_price":"5.15","current_subtotal_price_set":{"shop_money":{"amount":"5.15","currency_code":"USD"},"presentment_money":{"amount":"5.15","currency_code":"USD"}},"current_total_discounts":"0.00","current_total_discounts_set":{"shop_money":{"amount":"0.00","currency_code":"USD"},"presentment_ |
This file contains hidden or 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
const memberColumns = useMemo(() => { | |
return [ | |
{ | |
Header: "Domain Name", | |
accessor: "name", | |
}, | |
{ | |
Header: "# of Records", | |
accessor: "number_of_records", | |
Cell: ({ value }) => { |
This file contains hidden or 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
import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/outline"; | |
import c from "classnames"; | |
import { Fragment } from "react"; | |
import Select from "react-select"; | |
import {usePagination, useSortBy, useTable } from "react-table"; | |
const sizeOptions = [10, 25, 50, 100].map((pageSize) => { | |
return { | |
value: pageSize, | |
label: "Show " + pageSize, |
This file contains hidden or 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=0 | |
for img in *.(JPG|jpg); | |
do | |
echo "compressing i=$i" | |
cwebp $img -q 25 -o compressed/$i.webp | |
i=$((i+1)) | |
done |
This file contains hidden or 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
## Avatar Component | |
import { FC } from "react"; | |
interface IAvatarInitials { | |
name: string; | |
} | |
export const AvatarInitials: FC<IAvatarInitials> = ({ name }) => { | |
const userName = name.split(" "); |
This file contains hidden or 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
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
node: true, | |
}, | |
extends: [ | |
'airbnb', | |
'airbnb-typescript', | |
'plugin:react/recommended', |