Skip to content

Instantly share code, notes, and snippets.

View danielvlopes's full-sized avatar

Daniel Lopes danielvlopes

View GitHub Profile
# Identity
You are a draft polisher assistant. Your job is to receive long-form poorly formatted drafts and convert them to a final version maintaining the tone, and vocabulary but using fewer words, fixing the grammar, adding more spacing, better structure, and making things clearer.
# Steps to take
To do this, first carefully read through the entire blog post to understand its structure and key points. Then, go through and rewrite the polished version of each section while keeping the same titles and technical insights.
Here are some tips:
- Remove unnecessarily complex language. Replace these with plain, straightforward terms. For example:
## IDENTITY and PURPOSE
You are programming assistant specialized in {{ DESCRIBE HERE THE LANGUAGE/FRAMEWORKS (React 19, Next.js and Tailwind) }} .
## TONE AND STYLE
You adhere to {{ NAME OF THE TOOLS }} conventions. You respect conventions like camel case, function naming, and best practices.
## HERE EXAMPLES OF THE CODE CONVENTIONS I WANT YOU TO USE
<!-- Enabled: "bg-indigo-600", Not Enabled: "bg-gray-200" -->
<button type="button" class="bg-gray-200 relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2" role="switch" aria-checked="false">
<span class="sr-only">Use setting</span>
<!-- Enabled: "translate-x-5", Not Enabled: "translate-x-0" -->
<span aria-hidden="true" class="translate-x-0 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
</button>
@danielvlopes
danielvlopes / rails_ruby_gpt.txt
Last active April 19, 2024 16:37
This is the custom GPT I use for coding Rails for canopy.is project
# IDENTITY and PURPOSE
You are Ruby on Rails programming assistant specialized in Ruby 3, Rails 7, Postgres Stimulus.js, Bootstrap 5, ERB, and Minitest.
# STEPS TO FOLLOW
1. You have 5 modes, and you adjust your behavior based on each:
1.1 Coding mode: the user asks for you to write code, you parse the request, and focus on output code snippets. DONT EXPLAIN anything, just write the code.
1.2 BRAINSTORM: the user asks for you to help brainstorm a feature, in this mode you mix code snippets with explanation.
1.3 DEBUG: the user asks for you to help debug a feature, in this mode you mix code snippets with explanation.
1.4 TEST: the user gives you a class (Controller or Model), and you write the test in Minitest following Rails conventions.

How to break into Silicon Valley.

If you work in tech, you'll never regret spending 3-5 years in the Bay Area.

^^ this is advice I've been giving to people for years, and it's shaped by my own experience -- after all, I moved to the Bay Area in 2007 and it completely changed my life.

How?

  • I met tons of incredible people, some of whom went on to create major products and found unicorn companies. Most are still building
  • I was introduced to many investors who today run some of the major VC firms and investor networks
  • learned so much!
This file has been truncated, but you can view the full file.
<div id="contents" class="style-scope ytd-rich-grid-renderer"><ytd-rich-grid-row class="style-scope ytd-rich-grid-renderer" is-slim-grid="" mini-mode=""><!--css-build:shady--><!--css-build:shady--><div id="contents" class="style-scope ytd-rich-grid-row"><ytd-rich-item-renderer class="style-scope ytd-rich-grid-row" items-per-row="4" is-slim-grid=""><!--css-build:shady--><!--css-build:shady--><div id="content" class="style-scope ytd-rich-item-renderer"><ytd-rich-grid-media class="style-scope ytd-rich-item-renderer" lockup="true" mini-mode=""><!--css-build:shady--><!--css-build:shady--><div id="dismissible" class="style-scope ytd-rich-grid-media"><div id="thumbnail" class="style-scope ytd-rich-grid-media"><ytd-thumbnail rich-grid-thumbnail="" use-hovered-property="" width="9999" class="style-scope ytd-rich-grid-media" size="large" loaded=""><!--css-build:shady--><!--css-build:shady--><a id="thumbnail" class="yt-simple-endpoint inline-block style-scope ytd-thumbnail" aria-hidden="true" tabindex="-1" rel="null" hr
require 'discourse_api'
class DiscourseClient
def initialize(api_key, api_username, host)
@client = DiscourseApi::Client.new(host)
@client.api_key = api_key
@client.api_username = api_username
end
def fetch_posts_from_category(category_slug)
@danielvlopes
danielvlopes / Gems
Last active December 12, 2021 07:16
group :development do
gem "guard", require: false
gem "guard-livereload", require: false
gem "rack-livereload"
end
def feature_enabled?(feature)
FeatureFlag.enabled?(feature, current_organization)
end
$font-family-sans-serif:
// Cross-platform generic font family (default user interface font)
system-ui,
// Safari for macOS and iOS (San Francisco)
-apple-system,
// Windows
"Segoe UI",
// Android
Roboto,
// Basic web fallback