Skip to content

Instantly share code, notes, and snippets.

View heratyian's full-sized avatar
👋

Ian Heraty heratyian

👋
View GitHub Profile
@heratyian
heratyian / msm-functional-specification.md
Created October 23, 2024 18:26
Must See Movies Functional Specification

Must See Movies

A movie database where users can learn details about movies, directors, and actors.

Pain Point

@heratyian
heratyian / requirements.md
Created July 17, 2024 18:48
Readit Functional Specification

Readit Functional Specification

Readit is a community forum for sharing your ideas.

Pain Points

It's difficult to find a space to share your ideas.

Proposed Solution

A community forum where users can post, like, and comment your ideas.

User Stories

offer right

a buyer to seller marketplace

messages

  • id
  • created_at
  • updated_at
  • sender_id (user)
  • recipient_id (user)
  • item_id
@heratyian
heratyian / checkin-functional-spec.md
Last active March 12, 2024 21:00
checkin-functional-spec

Checkin Specification

Checkin sends an email to all members of a team based on the check_in configuration. Members can simply reply to this email and it will create a update record with their reply. As a manager, keeping track of what your direct reports are working on is time consuming. Syncronous meetings are annoying, time consuming, and not effective. Automating checkins via email automates this process and keeps a written record, while being minimally invasive.

User Stories

  • As a lead, I want to create a team, so that I can collaborate with my colleagues on projects.
  • As a lead, I want to invite members to my team by email, so that they can start receiving and responding to check-in prompts.
  • As a member, I want to respond to the morning and evening check-in emails, so that my team can be updated on my daily tasks and accomplishments.
  • As a lead, I want to review all check-in records for my team, so that I can keep track of progress and identify any potential issues early.
  • As a lead, I wa
@heratyian
heratyian / elon-5-steps.md
Last active March 1, 2024 12:55
elon-5-step-algorithm

Elon's 5-Step Engineering Design Process

1. Make requirements less dumb

Your requirements are definitely dumb. It does not matter who gave them to you. It's particularly dangerous if a smart person gave them to because you may not question them enough.

Whatever requirement or constraint you have must come with a name (not a department). That person who is putting forward the requirement/constraint must take responsibility for that requirement.

2. Delete a part or process

Very important. If you are not occasionally adding things back in, you are not deleting enough. The bias tends to be really strongly towards adding a process or step in case we need it. Ruthlessly remove parts/processes and don't hedge your bets.

@heratyian
heratyian / #ChatGPT Streaming.md
Created February 25, 2024 00:45 — forked from alexrudall/#ChatGPT Streaming.md
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.

@heratyian
heratyian / setup-rails-meta-tags.md
Last active December 11, 2023 17:35
Setup meta tags in your rails app
  1. Add gem "meta-tags" to your gemfile meta-tags

  2. Setup some default meta tags

app/helpers/application_helper.rb

module ApplicationHelper
  def default_meta_tags
    {
 site: "My Awesome App",
@heratyian
heratyian / how-to-setup-background-job.md
Last active December 11, 2023 15:51
Add background service for news.dpi.dev

This is how we created news.dpi.dev, a feed of all DPI trainees blog posts on dev.to. We used sidekiq for background processing, but you could easily use another gem like good_job.

app/controllers/news_controller.rb

class NewsController < ApplicationController
  layout "news"
  skip_before_action :authenticate_user!
  before_action { authorize(:news) }

  def index
@heratyian
heratyian / sdf-final-project-rubric.md
Last active December 4, 2023 21:57
SDF - Final Project Rubric

Final Project Rubric

This is intended to be filled out by staff members of DPI Tech Apprenticeship program. If you do not feel qualified to score a section, feel free to leave it blank.

  • Date/Time
  • Trainee Name
  • Project Name
  • Reviewer Name
@heratyian
heratyian / flash.md
Last active October 24, 2024 15:04
flashes

Demo of how to add bootstrap alerts for dismissable flashes

docs

app/views/shared/_flashes.html.erb


<% if notice.present? %>
  <div class="alert alert-success alert-dismissible fade show" role="alert">
 &lt;%= notice %&gt;