Skip to content

Instantly share code, notes, and snippets.

@alexrudall
alexrudall / #ChatGPT Streaming.md
Last active November 19, 2024 00:06
ChatGPT streaming with ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind!

How to add ChatGPT streaming to your Ruby on Rails 7 app!

This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!

Want more content like this, for free? Check out my free book, RailsAI!

Alt Text

@antonyh
antonyh / gist:5338945b37b6b52a98f5
Last active July 11, 2018 10:51
Various Selenium configurations for Capybara proxy
['capybara/poltergeist', 'capybara/webkit', 'selenium/webdriver'].each do |d|
begin
require d
rescue LoadError
end
@nick123pig
nick123pig / readme.md
Last active April 10, 2019 15:13
Dashing Table

dashing-table

Allows you to use tables with the dashing framework.

Preview

Basic Table Preview

@teamon
teamon / post_representer.rb
Created May 7, 2014 18:25
Ruby representers without a library
module PostRepresenter
include Representer
using Representer
def basic(post)
select(post, :id, :name)
end
def details(post)
basic(post) & comments(post)