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 fetch = require("cross-fetch"); | |
async function fetchAllLeads(url) { | |
const leadsMap = new Map(); | |
let offset = 0; | |
const limit = 100; | |
let totalLeads = Infinity; // initial dummy value | |
while (offset < totalLeads) { | |
try { |
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 fetch = require('cross-fetch'); | |
async function fetchAndCheckLeadsForTrackingmore(url) { | |
let offset = 0; | |
const limit = 100; | |
let totalLeads = Infinity; // Initial dummy value | |
while (offset < totalLeads) { | |
try { | |
const response = await fetch(`${url}&offset=${offset}&limit=${limit}`); |
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
// Description: This script registers a webhook, tests it, and then unregisters it. | |
// Run npm install cross-fetch to install the cross-fetch package. you can also use node-fetch but the ESM module system will struggle with it. | |
// To run the script, run: node webHookRegisterAndTest.js | |
const fetch = require("cross-fetch"); | |
const apiKey = "EXAMPLE_API_KEY"; | |
const webhookUrl = "https://public.prod.tenex.email/webhooks/register"; | |
const testWebhookUrl = "https://public.prod.tenex.email/webhooks/test"; | |
const unregisterWebhookUrl = "https://public.prod.tenex.email/webhooks/"; |
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
function gas() { | |
local repo_dir branch owner repo api_url gh_status conclusion color | |
# Ensure GITHUB_TOKEN is set | |
if [[ -z "$GITHUB_TOKEN" ]]; then | |
echo "❌ GITHUB_TOKEN is not set. Export it in your shell environment." | |
return 1 | |
fi | |
# Find the Git repo root |
OlderNewer