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
| 'use server'; | |
| import { exec } from 'node:child_process'; | |
| import fs from 'node:fs'; | |
| import path from 'node:path'; | |
| import { promisify } from 'node:util'; | |
| import { logger } from '@/utils'; | |
| const execPromise = promisify(exec); |
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
| /** | |
| * This script automates the process of adding secrets from a local .env file to a GitHub repository. | |
| * It uses the GitHub API to encrypt and store secrets securely using libsodium encryption. | |
| * | |
| * @module github-secrets | |
| * | |
| * How to run this script: | |
| * | |
| * For npm: | |
| * 1. Install dependencies: npm install |
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
| /** | |
| * A script to parse ICS (iCalendar) files and convert them to JSON format. | |
| * Supports processing either a single file or scanning a directory for multiple .ics files. | |
| * | |
| * @module ics-parser | |
| * | |
| * Usage: | |
| * - Process single file: node ics-parser.ts path/to/file.ics | |
| * - Process all .ics files in root: node ics-parser.ts --root | |
| * |
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
| /** | |
| * @fileoverview A utility for converting ICS (iCalendar) files to JSON format with customizable output options. | |
| * Supports flattening nested structures, removing fields, renaming keys, and filtering by date range. | |
| */ | |
| import { lines2tree } from 'icalts'; | |
| import { $ } from 'bun'; | |
| import { Command } from 'commander'; | |
| /** |
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
| /** | |
| * @fileoverview Creates an ICS calendar file with recurring events based on provided configuration | |
| */ | |
| import ical, { ICalEventRepeatingFreq, ICalWeekday } from 'ical-generator'; | |
| import { writeFileSync } from 'fs'; | |
| import { DateTime } from 'luxon'; | |
| import yargs from 'yargs'; | |
| import { hideBin } from 'yargs/helpers'; | |
| import type { ICalRepeatingOptions } from 'ical-generator/dist/index.d.ts'; |
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 { GoogleGenerativeAI } from '@google/generative-ai'; | |
| // Initialize the Google Generative AI client | |
| const genAI = new GoogleGenerativeAI('your-google-api-key'); // Replace with your actual API key | |
| const model = genAI.getGenerativeModel({ model: 'gemini-pro' }); | |
| // Example function that might throw an error | |
| function riskyOperation(input: string): string { | |
| if (input.length < 5) { | |
| throw new Error('Input is too short!'); |
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
| """ | |
| A comprehensive web scraping and content analysis tool that extracts, summarizes, and documents technical articles. | |
| This module provides functionality to: | |
| - Scrape technical content from web pages | |
| - Extract metadata and images | |
| - Generate AI-powered summaries using Google's Gemini model | |
| - Create and update Google Docs with the processed content | |
| The tool uses type hints throughout and follows strict type safety practices. |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # pylint: disable=W0611 | |
| import json | |
| import logging | |
| import os | |
| import random | |
| import re | |
| import subprocess |
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 FireCrawlApp, { MapParams } from '@mendable/firecrawl-js'; | |
| import { Command } from 'commander'; | |
| import * as dotenv from 'dotenv'; | |
| import fs from 'node:fs'; | |
| import path from 'node:path'; | |
| import ora from 'ora'; | |
| import chalk from 'chalk'; | |
| dotenv.config(); |
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
| /** | |
| * @fileoverview A comprehensive service for interacting with various Google Maps APIs. | |
| * This module provides a unified interface for geocoding, places search, directions, | |
| * distance calculations, and more Google Maps Platform services. | |
| * | |
| * Features: | |
| * - Geocoding: Convert addresses to coordinates and vice versa | |
| * - Places: Search for places, get place details, and autocomplete predictions | |
| * - Directions: Get directions between locations with waypoints and travel modes | |
| * - Distance Matrix: Calculate distances and travel times between multiple origins/destinations |