Create a GPT that can assist me.
It should be able to write code in my style.
Write a "Hello World"-style REST API that uses reCAPTCHA for validation before allowing access to other API routes.
| const express = require('express'); | |
| const AsyncRouter = require('@root/async-router'); | |
| const fetch = require('node-fetch'); // For making external API requests | |
| const app = AsyncRouter.Router(); | |
| // Secret key for reCAPTCHA | |
| const RECAPTCHA_SECRET_KEY = 'YOUR_SECRET_KEY'; | |
| app.post('/api/process-payment', async (req, res) => { |
Copied from https://github.com/bnnanet/bnna-payment-gateway.js/issues/5 for the immediate benefit of others, to be available as a Public gist until we make the whole repo public (once it's useful).
| // generated by GPT4o using the command summary in this README as the prompt: | |
| // https://github.com/posix-utilities/timeout | |
| use std::process::{Command, ExitStatus}; | |
| use std::time::Duration; | |
| use std::os::unix::process::CommandExt; | |
| use std::sync::{Arc, atomic::{AtomicBool, Ordering}}; | |
| use std::thread; | |
| use nix::sys::signal::{self, Signal}; | |
| use std::env; | |
| use std::ffi::OsString; |
Proxmox's pveam update fetches releases from http://download.proxmox.com/images/aplinfo-pve-8.dat
and https://releases.turnkeylinux.org/pve/aplinfo.dat, which can be changed in /usr/share/perl5/PVE/APLInfo.pm.
The dat files contain the names of images which can you use to get the direct pveam download download URLs,
for example:
| @copyright AJ ONeal 2024 MPL-2.0 |
As of v20, the 3CX web config doesn't accept EC certificates (probably a bad regex in the webui - doesn't seem to actually send the request).
You must use RSA certificates
See also:
| -- USAGE | |
| -- call show_references_to('my_much_referenced_table') \G | |
| DELIMITER // | |
| CREATE OR REPLACE PROCEDURE show_references_to( | |
| my_table_name VARCHAR(255) | |
| -- , my_column_name VARCHAR(255) | |
| ) | |
| BEGIN |
The vital resource for developers creating new command-line tools to learn the wisdom of the ancients.
All programs should universally implement these flags:
-V (uppercase), --version, version--help, help (also the default if nothing is given)-- stop processing flags; treat all else as raw arguments