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 useSWRSubscription, { SWRSubscriptionOptions } from 'swr/subscription' | |
| import { createClient } from 'graphql-ws' | |
| export function useSubscription<TResult, TVariables extends Variables | undefined>(subscription: TypedDocumentNode<TResult, TVariables>, variables?: TVariables) { | |
| return useSWRSubscription<TResult, any, GraphQLRequestInput<TResult, TVariables>>({ | |
| query: subscription, | |
| variables, | |
| } as GraphQLRequestInput<TResult, TVariables>, subscribe) | |
| } |
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
| using System; | |
| using System.Linq.Expressions; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using FluentValidation; | |
| using FluentValidation.Validators; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore.Infrastructure; | |
| using Microsoft.Extensions.DependencyInjection; |
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
| Application | |
| | Framework | |
| | | Database | |
| | | Logging | |
| | | Bus | |
| | | Validation | |
| | | Configuration | |
| | | Utilities | |
| | | Scheduler |
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
| insert into tblcredit (clientid, admin_id, date, description, amount, relid) | |
| select userid as clientid, 0, 'DATE', 'DESCRIPTION', creditamount as amount, 0 | |
| from ( | |
| select round(amount * 0.2, 2) as creditamount, userid, billingcycle, domainstatus | |
| from (select userid, amount, billingcycle, domainstatus | |
| from tblhosting | |
| where billingcycle = 'Monthly') as monthly | |
| union | |
| select round(amount / 3 * 0.2, 2) as creditamount, userid, billingcycle, domainstatus | |
| from (select userid, amount, billingcycle, domainstatus |
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
| $server = "your.sftp.server.com" | |
| $user = "yoursftpuser" | |
| $database = "databasename" | |
| $datetime = Get-Date -Format "yyyyMMddHHmmssffff" | |
| $filename = "$($database)_$($datetime)" | |
| $sqlFile = "$($filename).sql" | |
| $tarFile = "$($filename).tar.gz" | |
| mysqldump $database > $sqlFile |