Skip to content

Instantly share code, notes, and snippets.

Simplify: Code Review and Cleanup
Review all changed files for reuse, quality, and efficiency. Fix any issues found.
Phase 1: Identify Changes
Run git diff (or git diff HEAD if there are staged changes) to see what changed. If there are no git changes, review the most recently modified files that the user mentioned or that you edited earlier in this
conversation.
Phase 2: Launch Three Review Agents in Parallel
@vimota
vimota / gist:6a4ed159c57d288c3d6778287fe6e29f
Last active July 18, 2024 05:20
Shell command to get a txt dump of your NextJS codebase for prompting
bash -c '
print_directory_content() {
local dir="$1"
local prefix="$2"
echo "${prefix}${dir##*/}/"
for item in "$dir"/*; do
base_name=$(basename "$item")
if [[ "$base_name" == ".next" ||
"$base_name" == "node_modules" ||
"$base_name" == "data" ||
import duckdb from 'duckdb';
import fs from 'fs';
import readline from 'readline';
// Check if the file exists
const path = '/tmp/localpy.duckdb';
const fileExists = fs.existsSync(path);
// Create a new database object
const db = new duckdb.Database(path);
import duckdb
# Check if the file exists:
import os
path = "/tmp/localpy.duckdb"
file_exists = os.path.isfile(path)
con = duckdb.connect(path)
con.sql("install httpfs")
if not file_exists:
import { Database } from 'duckdb-async';
import fs from 'fs';
import readline from 'readline';
// Check if the file exists
const path = '/tmp/localpy.duckdb';
const fileExists = fs.existsSync(path);
const db = await Database.create(path);
### Keybase proof
I hereby claim:
* I am vimota on github.
* I am vimota (https://keybase.io/vimota) on keybase.
* I have a public key ASAgfjz6-1RaZKeXdzSr5Yq6aAuW4cqZNoTh0wSLZps5HAo
To claim this, I am signing this object:
FROM "codercom/code-server:latest"
RUN apt-get install -y wget
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.10/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get install apt-transport-https
RUN apt-get update
RUN apt-get install -y dotnet-sdk-2.2
Verifying my Blockstack ID is secured with the address 12j5XKuLqDtoQrdujTTN6JDbNLSMzPZkCR https://explorer.blockstack.org/address/12j5XKuLqDtoQrdujTTN6JDbNLSMzPZkCR
Verifying my Blockstack ID is secured with the address 12j5XKuLqDtoQrdujTTN6JDbNLSMzPZkCR https://explorer.blockstack.org/address/12j5XKuLqDtoQrdujTTN6JDbNLSMzPZkCR
@vimota
vimota / replace_with_symlink.sh
Created October 23, 2015 18:58
Replaces all files in current directory with symlink to the same file in another directory