How to query the ChatGPT API about large documents

Question I want to pass a large document (or many documents) to the ChatGPT API and then ask it some questions. However, due to the token limits, you can’t do that, because the documents have millions of words, while the…

Rails maintenance mode

Question Is it possible to activate a maintenance mode in a Rails application? Basically we need to stop the requests and display a maintenance page while we perform some updates on the database. Answer There isn’t a built-in solution in…

How to edit Rails credentials (full command)

Question I use Rails credentials for managing secrets in a secure way. Now I need to change some secret credentials for the production environment. Can you provide the full command for editing the file (config)? Answer This is the command:…

Passkeys explained simply

Question Passkeys will probably replace passwords in the future. How do they work? Can you explain passkeys in simple words? Answer When you sign up to a website, instead of entering a new password, your browser generates a new key…

php: command not found on MacOS and Homebrew

Question I have installed PHP on MacOS with Homebrew using this command: However if I run php from command line (e.g. php –version) I get this error: How can I fix this? Answer You need to use this command: However…

Error while installing openssl gem on MacOS with bundler

Question An error occurred while installing openssl (2.2.2), and Bundler cannot continue. How do I solve this error on MacOS? I have upgraded MacOS, Xcode, Xcode command line tools, Homebrew and the Homebrew formula for openssl. Now when I run…