Skip to content

Instantly share code, notes, and snippets.

@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.

@rbnpi
rbnpi / SonicPiReichLikeDrumsWithHydra.rb
Created January 24, 2023 14:57
Sonic Pi produces a Reich Like drum pattern which controls a Hydra Sketch. Video at https://youtu.be/Tk70Lc2QHJY
#Reich like drumming, by Robin Newman, January 2023
#I use hi and mid tomtoms for the two parts
#or you can set them both the same eg to hard snare
use_debug false
use_midi_logging false
use_midi_defaults channel: 1,port: "iac_driver_bus"
link #lets you adjust tempo as program is running
#set master pattern option with uniform amp or accented amp
#uncomment either the 12 beat or 16 beat patterns
@lazerl0rd
lazerl0rd / 20-makepkg.hook
Last active April 2, 2024 04:13
A Makepkg configuration for Arch Linux that utilises LLVM and takes optimisation up to eleven.
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = etc/makepkg.conf
Target = usr/share/makepkg/buildenv/lto.sh
Target = usr/share/makepkg/executable/strip.sh
[Action]
Description = Modifying the Makepkg configuration...
@YoEight
YoEight / improve_fonts.md
Created January 15, 2021 10:11 — forked from j1cs/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@thadguidry
thadguidry / docker-openrefine-rdf-extension.yml
Created December 2, 2020 22:35
Dockerfile for OpenRefine with RDF Extension
#
# Dockerfile for OpenRefine with RDF Extension
#
FROM openjdk:8-jre-alpine
MAINTAINER thadguidry@gmail.com
ENV OPENREFINE_MEMORY 2G
ENV OPENREFINE_VERSION 3.4.1
ENV OPENREFINE_FILE openrefine-linux-${OPENREFINE_VERSION}.tar.gz
@madskjeldgaard
madskjeldgaard / PKGBUILD
Last active February 20, 2023 04:46
Arch linux PKGBUILD for installing the Aalto Sparta Plugins
# Maintainer: Mads Kjeldgaard <mail@madskjeldgaard.dk>
pkgname=sparta-plugins
pkgver=2020_10_09_v1.4.2
pkgrel=1
pkgdesc='AALTO vst plugins for Spatial Audio Real-time Applications'
arch=('x86_64')
url="http://research.spa.aalto.fi/projects/sparta_vsts/"
license=('GPL')
depends=('netcdf' 'hdf5' 'lapack' 'webkit2gtk' 'netcdf-fortran' 'libcurl-gnutls')
provides=()
@NSBum
NSBum / CompressAndTruncate.txt
Created July 13, 2020 14:31
Audacity macro to trim silence and compress dynamic range
SelectAll:
TruncateSilence:Action="Truncate Detected Silence" Compress="50" Independent="0" Minimum="0.5" Threshold="-20" Truncate="0.5"
Compressor:AttackTime="0.2" NoiseFloor="-40" Normalize="1" Ratio="2" ReleaseTime="1" Threshold="-12" UsePeak="0"
@mxmilkiib
mxmilkiib / lv2-over1200-uri-list
Last active April 17, 2024 23:16
Over 1200 LV2 plugins. Almost all are available in the AUR for Arch Linux/Manjaro/pacman distributions. Note URIs are normally only used internally in hosts.
# IFS=$'\n' arr=($(lv2ls)) && IFS=$'\n' arr2=($(lv2ls -n)) && for (( i=0; i<${#arr[*]}; ++i)); do printf "%s|%s\n" "${arr[$i]}" "${arr2[$i]}"; done | column -t -s "|"
file:///usr/lib/lv2/audio_to_audio.ingen/main.ttl audio_to_audio
file:///usr/lib/lv2/control_to_control.ingen/main.ttl control_to_control
file:///usr/lib/lv2/cv_to_cv.ingen/main.ttl cv_to_cv
file:///usr/lib/lv2/event_to_event.ingen/main.ttl event_to_event
file:///usr/lib/lv2/gen_amsynth_filte_out.ingen/main.ttl gen_amsynth_filte_out
file:///usr/lib/lv2/MonoEffect.ingen/MonoEffect.ttl Ingen Mono Effect Template
file:///usr/lib/lv2/MonoInstrument.ingen/MonoInstrument.ttl Ingen Mono Instrument Template
file:///usr/lib/lv2/StereoEffect.ingen/StereoEffect.ttl Ingen Stereo Effect Template
file:///usr/lib/lv2/StereoInstrument.ingen/StereoInstrument.ttl
@DarkPanth3r
DarkPanth3r / ansible-summary.md
Last active May 6, 2023 06:17 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

Ansible Summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of