Skip to content

Instantly share code, notes, and snippets.

View satoryu's full-sized avatar
🤘
Put your 🦊 up!

Tatsuya Sato satoryu

🤘
Put your 🦊 up!
View GitHub Profile
@alexrudall
alexrudall / #ChatGPT Streaming.md
Last active May 3, 2024 02:54
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!

Alt Text

First, add the ruby-openai gem! Needs to be at least version 4. Add Sidekiq too.

https://zverok.space/blog/2022-03-03-WAR.html 翻訳

ハリコフのRubyistからRubyコミュニティへのお願い

2022年3月3日

やぁ、僕はVictor Shepelev。ウクライナのハリコフに住んでいて、TwitterGitHubでは@zverokというIDで活動している。

僕がRubyを書き始めたのは2003年からで、いくつかのライブラリやRuby Changelogのメンテナだ。国際的なカンファレンスや/r/rubyなんかで君たちと会ったことがあるかも知れない。今年、僕はRubyコミッターに申請して、嬉しいことに承認された。僕が取り組んでいるのは(いくつかの小さな機能追加と共に)Rubyドキュメントの改善だ。僕のRubyに関する作業の一覧はここで確認できる

小学生が見るべき映画

ディズニー/Pixar

  • アナと雪の女王
  • ウォーリー
  • Mr.インクレディブル
  • インサイドヘッド
  • ファインディング・ニモ
  • ベイマックス
  • モンスターズ・インク
@castwide
castwide / rails.rb
Last active April 27, 2024 08:54
Enhance Rails Intellisense in Solargraph
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
#
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
#
# @!parse
# class ActionController::Base
@voluntas
voluntas / loadtest.rst
Last active April 3, 2024 03:25
負荷試験コトハジメ
@yattom
yattom / fraction.md
Last active July 25, 2017 22:54
TDDのお題 計算機

いろいろな計算ができる計算機を作ってください。以下のインターフェースはあくまで一例(イメージ)です。

  1. 整数の足し算ができるようにしてください

calc("+", 3, 4) => 7

  1. 整数の引き算ができるようにしてください

calc("-", 10, 4) => 6

@rpanachi
rpanachi / db.rake
Created April 10, 2016 21:26
Rakefile for Sequel database operations
namespace :db do
require 'sequel'
Sequel.extension(:migration)
MIGRATIONS_PATH = 'db/migrations'
def db_conn_env
ENV["BOOKSHELF_DATABASE_URL"]
end

First you want some software. You know what you want, so it makes sense that it’s most convenient if the the software is built by yourself.

Unfortunately (or luckily) you’re too busy doing your own stuff to write a software. You call up someone and ask him to write the software for you. You save time and he got a job. Win-Win!

But wait. He needs to understand what you want. You need to tell the developer what you want. You need communication. One of the problems of communication is you cannot tell if you successfully communicated. You ask something. The only way to see if your request is communicated right is to see the resulting product. The developer show the product as a proof of the communication.

Time is money. If it proves wrong after several months, ah-oh. It’s wasted time. You don’t want to waste time or money. You want to see the proof early, as early as possible. So the developer wants to, for the sake of a satisfied customer, create only a small chunk of software and show it to yo