Skip to content

Instantly share code, notes, and snippets.

@stvhanna
stvhanna / roo_workflow.md
Created May 31, 2025 22:10 — forked from livecodelife/roo_workflow.md
Roo Code Setup and Workflow for the best $0 development

Roo Code Workflow: An Advanced LLM-Powered Development Setup

This gist outlines a highly effective and cost-optimized workflow for software development using Roo Code, leveraging a multi-model approach and a custom "Think" mode for enhanced reasoning and token efficiency. This setup has been successfully used to build complex applications, such as Baccarat game simulations with betting strategy analysis.


Core Components & Model Allocation

The power of this setup lies in strategically assigning different Large Language Models (LLMs) to specialized "modes" within Roo Code, optimizing for performance, cost, and specific task requirements.

@stvhanna
stvhanna / statesAndCounties.js
Created February 12, 2023 18:42 — forked from JoshuaCarroll/statesAndCounties.js
JavaScript array of all US states and counties
function County(strState, strCountyName) {
this.state = strState;
this.countyName = strCountyName;
}
var arrStates = new Array("AK","AL","AR","AZ","CA","CO","CT","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY", "OH","OK","OR","PA","SC","SD","TN","TX","UT","VA","VT","WA","WI","WV","WY");
var arrCounties = new Array(
new County("AL","Autauga County"),
@stvhanna
stvhanna / array-us-cities.py
Created February 12, 2023 18:42 — forked from ruanbekker/array-us-cities.py
Array of American Towns/Cities
us_cities = ["Abbeville", "Abbotsford", "Aberdeen", "Abilene", "Abingdon", "Abington", "Absecon", "Acampo", "Accokeek", "Achille", "Acme", "Acton", "Acushnet", "Acworth", "Ada", "Adair", "Adairsville", "Adams", "Adams Run", "Adamstown", "Adamsville", "Addieville", "Addis", "Addison", "Addyston", "Adel", "Adelanto", "Adena", "Adkins", "Adrian", "Advance", "Afton", "Agawam", "Agoura Hills", "Agra", "'Aiea", "Aiken", "Ailey", "Airville", "Ajo", "Akhiok", "Akron", "Alabaster", "Alameda", "Alamo", "Alamogordo", "Albany", "Albemarle", "Albert City", "Albert Lea", "Albertson", "Albertville", "Albia", "Albion", "Albrightsville", "Albuquerque", "Alburtis", "Alcoa", "Alden", "Aldie", "Aledo", "Alexander", "Alexander City", "Alexandria", "Alfred", "Alger", "Algoma", "Algonquin", "Alhambra", "Alice", "Aliceville", "Aliquippa", "Aliso Viejo", "Allegan", "Allen", "Allendale", "Allen Park", "Allenport", "Allenton", "Allentown", "Alliance", "Allison Park", "Alloway", "Allston", "Allyn", "Alma", "Almont", "Alna", "Alpena", "A
@stvhanna
stvhanna / cities.json
Created February 12, 2023 18:41 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@stvhanna
stvhanna / app.js
Created November 3, 2022 06:28 — forked from ljahier/app.js
Move all photos from google takeout into one directory.
const { mkdir, readdir, rename, stat } = require('fs/promises');
async function main() {
try {
await mkdir('./photos')
console.debug('Photo directory successfully created');
} catch (err) {
console.debug('Photo directory already exist');
}
@stvhanna
stvhanna / mousemove.ps1
Created August 2, 2022 21:04 — forked from MatthewSteeples/mousemove.ps1
Powershell Script to keep the mouse moving
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X % 500) + 1
$y = ($pos.Y % 500) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
Start-Sleep -Seconds 10
}
@stvhanna
stvhanna / performance-timing.js
Created January 5, 2022 20:11 — forked from ShirtlessKirk/performance-timing.js
Performance timing polyfill
/**
* performance-timing.js: Polyfill for performance.timing object
* For greatest accuracy, this needs to be run as soon as possible in the page, preferably inline.
* The values returned are necessarily not absolutely accurate, but are close enough for general purposes.
* @author ShirtlessKirk. Copyright (c) 2014.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
(function (window) {
'use strict';
@stvhanna
stvhanna / what-forces-layout.md
Created January 3, 2022 05:21 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
#!/bin/bash
# SET THIS TO BE YOUR DESIRED USERNAME
export MY_USER_NAME_FOR_CERT=`whoami`
# This directory is optional, but will use it to keep the CA root key safe
mkdir keys certs
chmod og-rwx keys certs
# Set up a directory that will serve as the pgconf mount
@stvhanna
stvhanna / clouflare-worker-static-page-backblaze.js
Created August 29, 2021 18:20 — forked from maltechx/clouflare-worker-static-page-backblaze.js
Host a static page on Backblaze and distribute it via Cloudflare and their Workers.
// Imprved the script from this blog https://www.grahn.io/posts/2020-02-08-s3-vs-b2-static-web-hosting/
// Backblaze Url
const baseURL = "https://f000.backblazeb2.com/file/yourbucket"
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
async function handleRequest(event) {