Skip to content

Instantly share code, notes, and snippets.

View arbaaz's full-sized avatar
🔥
Building an amazing product

Arbaaz arbaaz

🔥
Building an amazing product
View GitHub Profile
@arbaaz
arbaaz / cline-system.md
Last active March 11, 2025 12:40
Cline System Prompt

You are Cline, a world-class full-stack developer and UI/UX designer. Your expertise covers:

  • Rapid, efficient application development
  • The full spectrum from MVP creation to complex system architecture
  • Intuitive and beautiful design Adapt your approach based on project needs and user preferences, always aiming to guide users in efficiently creating functional applications. Core Principle
  • Ecosystem Thinking: Always consider how components fit into the larger ecosystem.
  • Modular Development: Deconstruct complex projects into smaller sub-goals, components, and sub-components to create a detailed ecosystem map.
  • Rapid MVP Creation: Focus on quickly developing MVPs with essential functionality for each component.
  • Incremental Integration: Build towards the larger ecosystem through gradual combination of MVPs.
@arbaaz
arbaaz / uploadYoubeVideos.js
Last active February 23, 2025 17:16
Notebook LLM upload youtube URLs (Steps at the bottom)
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
async function uploadYoutubeVideo(url) {
console.log("clicking upload button")
await Promise.race([
new Promise((resolve, reject) => {
try {
document.querySelector("button.add-source-button")?.click();
resolve();
} catch (e) {
@arbaaz
arbaaz / scrape.ts
Created November 7, 2024 09:56
Cloudflare Workflow template
import {
WorkflowEntrypoint,
WorkflowEvent,
WorkflowStep,
} from "cloudflare:workers";
import { NonRetryableError } from "cloudflare:workflows";
export type ScrapeParams = {
url: string;
};
@arbaaz
arbaaz / app.tsx
Created October 21, 2024 09:27
Data Test ID Explainer
const H1 = ({ children }) => {
return <h1>{children}</h1>;
};
const Checkbox = ({ dataTestId }) => {
return <input type="checkbox" data-testid={dataTestId} />;
};
export default function App() {
return (
@arbaaz
arbaaz / set_fly_secrets.py
Created September 16, 2024 06:15
Set Fly.io secrets in batch from .envrc
#!/usr/bin/env python3
import os
import subprocess
import tempfile
def process_line(line):
# Skip comments and empty lines
if line.strip().startswith('#') or not line.strip():
return None
@arbaaz
arbaaz / GoogleAnalytics.jsx
Created June 15, 2023 12:19
Google Analytics in Nextjs
import { useEffect } from "react";
import * as gtag from "lib/gtag";
import { useRouter } from "next/router";
import Script from "next/script";
export default function GoogleAnalytics({ enabled }) {
const router = useRouter();
useEffect(() => {
@arbaaz
arbaaz / machine.js
Last active April 11, 2020 16:18
Generated by XState Viz: https://xstate.js.org/viz
const timeOfDayMachine = Machine({
id: 'psm',
initial: 'namaz',
context: {
time: new Date(Date.now())
},
on: {
Root_Mode: {
actions: assign({ level: 'root' })
},
@arbaaz
arbaaz / rename_to_ts.sh
Created September 18, 2019 05:11
Rename to typescript
for f in src/containers/**/*.js; do
# echo "${f%.js}.ts"
mv -- "$f" "${f%.js}.ts"
done
@arbaaz
arbaaz / ansible-summary.md
Created August 23, 2018 10:02 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

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

Configuration file

intro_configuration.html

First one found from of

kubectl get nodes
kubectl cluster-info
minikube dashboard
kubectl api-resources
kubectl get pods