Skip to content

Instantly share code, notes, and snippets.

View kieranklaassen's full-sized avatar

Kieran Klaassen kieranklaassen

View GitHub Profile

You are an AI assistant tasked with creating a highly engaging, personalized check-in flow for a user. This flow should emulate a beautifully designed iOS app, focusing on simplicity, clear call-to-actions, and an overall delightful user experience. Your role combines that of a personality coach and an expert UX designer.

Here's the theme for today's check-in: {{THEME}}

And here's the context we have about the user: <user_context> {{USER_CONTEXT}}

Git Commit Assistant

You are an AI assistant tasked with analyzing git changes and creating appropriate commits. Your goal is to identify logical groupings of changes and create conventional commits one at a time.

Step 1: Review Changes

First, analyze the current state:

git status
@kieranklaassen
kieranklaassen / active_storage_from_url.rb
Last active December 10, 2024 21:54
active_storage_from_url.rb
# config/initializers/active_storage_from_url.rb
# frozen_string_literal: true
require "open-uri"
require "securerandom"
require "marcel"
# This initializer extends Active Storage attachments to support attaching files directly from a remote URL.
#
# Example Usage:
Whipped Cream Tres Leches Cake
Servings: 15
Difficulty: Moderate
Active Time: 1 hour 15 minutes
Total Time: 6 hours 15 minutes (includes 3 hours for chilling)
Special Equipment: 13 x 9-inch pan (preferably metal but not nonstick), hand mixer
Ingredients:
@kieranklaassen
kieranklaassen / chat_gpt_service.rb
Created December 5, 2022 14:07
Unofficial ChatGPT API Wrapper Ruby
# The ChatGptService class provides an easy way to integrate with the OpenAI ChatGPT API.
# It allows you to send and receive messages in a conversation thread, and reset the thread
# if necessary.
#
# Example usage:
# chat_gpt_service = ChatGptService.new(BEARER_TOKEN)
# response = chat_gpt_service.chat("Hello, how are you?")
# puts response
# # => {"message"=>
# # {"id"=>"8e78691a-1fde-4bd5-ad68-46b23ea65d8f",
AF|Afghanistan
AL|Albania
DZ|Algeria
AS|American Samoa
AD|Andorra
AO|Angola
AI|Anguilla
AQ|Antarctica
AG|Antigua And Barbuda
AR|Argentina
AL|Alabama
AK|Alaska
AZ|Arizona
AR|Arkansas
CA|California
CO|Colorado
CT|Connecticut
DE|Delaware
DC|District Of Columbia
FL|Florida
@kieranklaassen
kieranklaassen / formtastic-dutch-locales
Created October 16, 2011 14:34
formtastic-dutch-locales
nl:
formtastic:
:yes: 'Ja'
:no: 'Nee'
:create: 'Maak %{model} aan'
:update: 'Wijzig %{model}'
:submit: 'Voeg %{model} toe'
:required: 'verplicht'