Skip to content

Instantly share code, notes, and snippets.

@radanskoric
radanskoric / app.rb
Created November 28, 2023 10:25
Turbo Frames and Streams on Sinatra
# This is a little experiment in using Turbo Frames and Streams without Rails.
# Built using just plain Sinatra as the web server.
#
# Make sure that you have sinatra and puma (or some other server) installed:
# gem install sinatra
# gem install puma
#
# You can then run the app with:
# ruby app.rb
require 'sinatra'
@radanskoric
radanskoric / async_activerecord.rb
Last active October 17, 2023 09:33
Rails 7.1 async database query execution key functionality recreated as plain Ruby, for better understanding
# == NOTE ==
# This gist is accompnaying a blog post on the topic: https://radanskoric.com/articles/understand-rails-async-db-queries
require 'bundler/inline'
require "benchmark"
require "debug"
require "uri"
gemfile do
source 'https://rubygems.org'

Keybase proof

I hereby claim:

  • I am radanskoric on github.
  • I am radan (https://keybase.io/radan) on keybase.
  • I have a public key whose fingerprint is 41F2 EF64 3313 5FFB 1084 F96F 4F46 CCB4 AE6D D809

To claim this, I am signing this object: