Short system prompts for transforming dictated text (usually processed by OpenAI Whisper) into specific formats and styles and for various purposes.
Timestampped export on May 30, 2025
| const request = require('request'); | |
| exports.main = async (event, callback) => { | |
| /* BE SURE TO ADD THE CONTACT ID INTO THE 'PROPERTY TO INCLUDE IN CODE' SECTION OF THE CUSTOM CODED ACTION */ | |
| const contact_id = event.inputFields['hs_object_id']; | |
| /* LOOK UP THE CONTACT VIA THE ID AND RETRIEVE THE PROPERTY 'hs_additional_emails' */ | |
| var options = { | |
| "method": "GET", | |
| "url": "https://api.hubapi.com/crm/v3/objects/contacts/" + contact_id + "?hapikey=" + process.env.HAPIKEY + "&properties=hs_additional_emails" |
Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.
To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.
| /* | |
| Autosend Invites to anyone that shares X number of connections with you. | |
| Way to use this script: | |
| 1. Save it as a bookmarklet | |
| 2. Go to 'People you may know' | |
| 3. Click on this bookmarklet. | |
| 4. Enter number of overlapping connections | |
| 5. Check your console |
| // By @coderitual | |
| // https://twitter.com/coderitual/status/1112297299307384833 | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // or | |
| const sleep = util.promisify(setTimeout); |
in case of processing a very large array e.g. Promise.all(A_VERY_LARGE_ARRAY_OF_XHR_PROMISE)
which would probably blow you browser memory by trying to send all requests at the same time
solution is limit the concurrent of requests, and wrap promise in thunk
Promise.allConcurrent(2)([()=>fetch('BLAH1'), ()=>fetch('BLAH2'),...()=>fetch('BLAHN')])
| import { createRequire } from "module"; | |
| const require = createRequire(import.meta.url); | |
| // usage | |
| const creds = require('./config/creds.json'); |
| // url_to_drive.gs | |
| // Google Apps Script | |
| // Allows uploading a URL directly to Google Drive. | |
| // | |
| // Live link: | |
| // https://script.google.com/macros/s/AKfycbzvhbHS4hnWPVBDHjQzZHA0qWq0GR-6hY7TbYsNto6hZ0MeAFZt/exec | |
| // | |
| // Source-code: | |
| // https://gist.github.com/denilsonsa/8134679 | |
| // https://script.google.com/d/1Ye-OEn1bDPcmeKSe4gb0YSK83RPMc4sZJt79SRt-GRY653gm2qVUptoE/edit |
| /* | |
| * script to export data in all sheets in the current spreadsheet as individual csv files | |
| * files will be named according to the name of the sheet | |
| * author: Michael Derazon | |
| */ | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; | |
| ss.addMenu("csv", csvMenuEntries); |