Skip to content

Instantly share code, notes, and snippets.

View thomaspockrandt's full-sized avatar
🔍
Focused

Thomas Pockrandt thomaspockrandt

🔍
Focused
View GitHub Profile
@alexrudall
alexrudall / #ChatGPT Streaming.md
Last active July 2, 2024 22:32
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

@oxo-yuta
oxo-yuta / NuxtDeployToFirebase.yml
Last active December 11, 2020 15:10
yml for Github Actions to deploy Nuxt project to Firebase
name: Deploy to firebase
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
@mike0004
mike0004 / mac-realsleep.sh
Created October 12, 2015 12:07
Set mac power settings to prevent battery drain during sleep
# show pmsettings (see `man pmset` or http://bit.ly/1LDWm37)
pmset -g
# see what wakes up your host
syslog |grep -i "Wake reason"
# turn off sleep settings
sudo pmset ttyskeepawake 0
sudo pmset womp 0
sudo pmset powernap 0
@kwk
kwk / README.md
Created October 1, 2014 13:52
Forgot to sign-off commits?

No problem,

run

git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name <Your.Name@example.com>'" HEAD~2..HEAD

To sign-off the last two commits.

Then force to push them to the remote repo with the -f option: