Skip to content

Instantly share code, notes, and snippets.

View ccfiel's full-sized avatar

Chris Ian Fiel ccfiel

View GitHub Profile
@ccfiel
ccfiel / tuya_water_meter_converter.mjs
Last active July 31, 2025 16:18
Zigbee2Mqtt Add zemismart Tuya Zigbee Ultrasonic Water Meter Valve
import * as exposes from "zigbee-herdsman-converters/lib/exposes";
import * as tuya from "zigbee-herdsman-converters/lib/tuya";
const e = exposes.presets;
const ea = exposes.access;
/** @type {import('zigbee-herdsman-converters').Definition} */
export default {
fingerprint: [
{
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)