This file contains 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
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |
This file contains 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
# The ChatGptService class provides an easy way to integrate with the OpenAI ChatGPT API. | |
# It allows you to send and receive messages in a conversation thread, and reset the thread | |
# if necessary. | |
# | |
# Example usage: | |
# chat_gpt_service = ChatGptService.new(BEARER_TOKEN) | |
# response = chat_gpt_service.chat("Hello, how are you?") | |
# puts response | |
# # => {"message"=> | |
# # {"id"=>"8e78691a-1fde-4bd5-ad68-46b23ea65d8f", |
This file contains 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
// Go to menue: | |
// find->find in files | |
// Switch on reg_ex button | |
// Find: | |
^(.*)$ | |
// Where: | |
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
// Then click on the find button | |
// Be careful to not click on Replace!!! |