Skip to content

Instantly share code, notes, and snippets.

View ccfiel's full-sized avatar

Chris Ian Fiel ccfiel

View GitHub Profile
import { Client, getLagoError } from "lago-javascript-client";
import "dotenv/config";
const isInvoiceInvalid = (invoice) => {
let invalidInvoice = false;
invoice.metadata.forEach((meta) => {
if (meta.key === "invalidInvoice") {
invalidInvoice = true;
}
});
retryPayment
@ccfiel
ccfiel / api.yml
Last active October 31, 2023 23:26
action
name: Veent Server Production
run-name: ${{ github.actor }} is building Veent Server Production 🚀
on:
push:
paths:
- 'apps/api/**'
jobs:
Build-Production-Server:
runs-on: ubuntu-latest
defaults:
name: KaHero GraphQL Server Production
run-name: ${{ github.actor }} is building KaHero GraphQL Server Production 🚀
on:
release:
types: [published]
jobs:
Build-Production-GraphQL-Server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ccfiel
ccfiel / staging.yml
Created September 18, 2023 07:52
staging.yml
name: KaHero GraphQL Server Staging
run-name: ${{ github.actor }} is building KaHero GraphQL Server Staging 🚀
on:
push:
branches:
- 'release/**'
- 'hotfix/**'
jobs:
Build-Staging-GraphQL-Server:
runs-on: ubuntu-latest
@ccfiel
ccfiel / queue.ts
Last active September 14, 2023 07:23
bullmq
/* eslint-disable no-var */
import type { Processor } from 'bullmq';
import { QueueEvents, Queue, Worker } from 'bullmq';
import { redis } from './db';
type AugmentedQueue<T> = Queue<T> & {
events: QueueEvents;
};
interface RegisteredQueue {
@ccfiel
ccfiel / production.yml
Last active September 12, 2023 13:49
Northflank
name: KaHero GraphQL Server Production
run-name: ${{ github.actor }} is building KaHero GraphQL Server Production 🚀
on:
push:
branches:
- main
jobs:
Build-Production-GraphQL-Server:
runs-on: ubuntu-latest
steps:
@ccfiel
ccfiel / production.yml
Last active September 12, 2023 07:40
northflank
name: KaHero GraphQL Server Production
run-name: ${{ github.actor }} is building KaHero GraphQL Server Production 🚀
on:
push:
branches:
- main
jobs:
Build-Production-GraphQL-Server:
runs-on: ubuntu-latest
steps:
from sendgrid import SendGridAPIClient
sg = SendGridAPIClient('SG.xxxxxxFLuoyyyyyMEboqvXI')
response = sg.client.contactdb.lists.get()
print(response.status_code)
print(response.body)
print(response.headers)
@ccfiel
ccfiel / index.js
Created June 29, 2022 01:42
index.js
import Head from 'next/head';
import { ThemeProvider } from 'styled-components';
import { theme } from 'common/theme/appclassic';
import { ResetCSS } from 'common/assets/css/style';
import Sticky from 'react-stickynode';
import Navbar from 'containers/AppClassic/Navbar';
import Banner from 'containers/AppClassic/Banner';
import KeyFeatures from 'containers/AppClassic/KeyFeatures';
import AppSlider from 'containers/AppClassic/AppSlider';
import AppSlider2 from 'containers/AppClassic/AppSlider2';