Skip to content

Instantly share code, notes, and snippets.

@codingthefuturewithai
codingthefuturewithai / yt-aider-cursor-windsurf-tutorial-prompts.md
Created November 19, 2024 02:02
Prompts from YouTube tutorial: Aider, Cursor, Windsurf: Build Apps with a SINGLE prompt, NO coding!

Sequential Prompts from Original RAG with aider and Claude 3.5 Sonnet Tutorial

LangChain RAG App Prompts

Initial RAG App Setup

Prompt: Use the LangChain RAG tutorial documentation, which I provided to you previously, to generate a simple RAG app in Python that uses the LangChain v0.2 framework. The app will allow the user to provide the URL for a web page and ask questions related to the contents of the page. The user interface will be the command line for now. The app should use OpenAI models and APIs. Generate all the required files, functions, methods, imports, etc. but don't implement any functions yet. Instead, just insert comments. Also, generate the Python requirements.txt file. Only implement the features I've requested.


{%- comment -%}
Renders the template name based on the template object.
Accepts:
- template {Template object} - Template object
Usage:
<body class="{% render 'template-name', template: template -%}">...</body>
{%- endcomment -%}
@davidwarrington
davidwarrington / submit-form.js
Last active August 21, 2023 01:46
Submit a form with JS
/** @param {HTMLFormElement} form */
async function submitForm(form) {
const body = new FormData(body)
return fetch(form.action, {
method: form.method,
body,
})
}
const blockhash = "0x5cb3e33c31019c9e5f77f354f150e4d74eb95a029a69738d45c176bc1447e444"
const fs = require("fs").promises
const seedrandom = require("seedrandom")
const chooser = require("random-seed-weighted-chooser").default
const SparkMD5 = require("spark-md5")
const random = seedrandom(blockhash)
const uniques = [{
@ashukasma
ashukasma / add.js
Created February 8, 2021 10:12
Add item to cart in shopify using Fetch API JS
var VID = 0;
var addData = {
'id':VID,
'quantity':1
};
fetch('/cart/add.js', {
body: JSON.stringify(addData),
credentials: 'same-origin',
headers: {
@stolinski
stolinski / Example.tsx
Last active June 8, 2022 05:54
Route Transitions with Framer Motion
const FakeComponent = () => {
return (
<AnimatedRoutes exitBeforeEnter initial={false}>
<RouteTransition exact path="/some-route">
<NewUsers />
</RouteTransition>
<RouteTransition exact path="/yo" >
<Users />
</RouteTransition>
</AnimatedRoutes>
@RDoney
RDoney / free-shipping.html
Last active February 5, 2025 09:27
Shopify free shipping progress calculator
<!-- Free shipping progress markup -->
<div class="cart-shipping__wrapper">
<p class="cart-shipping__numOuter">You're $<span class="cart-shipping__num"></span> away from free shipping!</p>
<p class="cart-shipping__success">You're eligible for Free Shipping!</p>
<div class="cart-shippingThreshold__bar">
<span class="cart-shippingThreshold__progress"></span>
</div>
</div>
<style>
@shopifypartners
shopifypartners / announcement-bar.liquid
Created October 25, 2019 15:58
How to Create a Customizable Announcement Bar Section
<style>
.announcement-bar {
background-color: {{ section.settings.announcement_bar_color }};
text-align: center;
text-decoration: none;
}
.announcement-bar__message {
font-size: large;
padding: 10px;
color: {{ section.settings.announcement_bar_text_color }};
@kellyvaughn
kellyvaughn / _quickview.scss.liquid
Last active September 6, 2023 08:06
Shopify Quick View
#quick-view {
display: flex;
height: 100%;
justify-content: flex-end;
flex-wrap: wrap;
position: relative;
-ms-overflow-style: -ms-autohiding-scrollbar;
.qv-product-images {
width: 60%;
height: auto;
@urre
urre / gist:30523173fb22e3a375fa
Created October 27, 2014 13:44
Slick.js slider with thumbnails
$('.specs__slider').slick({
dots: true,
centerMode: true,
focusOnSelect: true,
arrows: false,
customPaging: function(slider, i) {
return '<div class="thumbnails">' +$(slider.$slides[i]).find('img').prop('outerHTML')+ '</div>';
}
});