Skip to content

Instantly share code, notes, and snippets.

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
terraform {
required_version = ">= 0.12"
# ❌ No backend configured.
# ✅ Fix: Configure a remote backend (e.g., Azure Storage with state locking).
}
provider "azurerm" {
features {}
# ❌ Hardcoded sensitive credentials.
subscription_id = "00000000-0000-0000-0000-000000000000" # ✅ Use env variables.
apiVersion: apps/v1
kind: Deployment
metadata:
name: order-processing
labels:
app: order-processing
spec:
replicas: 3
selector:
matchLabels:
@Max-Levitskiy
Max-Levitskiy / devcontainers-m1.md
Created February 2, 2024 18:29
devcontainers on m1 chips

If you have a problem you can't run devcontaintes on m1/m2/m3... chips because there is no image for arm architecture, you can use Calima to run docker.

Install:

brew install colima

Run:

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@Max-Levitskiy
Max-Levitskiy / coinmarketcap-portfolio-to-csv.js
Created August 3, 2023 17:37
Get coinmarketcap portfolio as csv
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
// Use these selectors based on the HTML structure you provided
const portfolioSelector = '[data-rbd-droppable-id="droppable"]';
const portfolioItemSelector = '[data-rbd-draggable-context-id="0"]';
const coinTableSelector = '.portfolio-tablelist-wrapper';
const coinRowSelector = 'tbody tr';
const transactionTableSelector = '.cmc-table';

Keybase proof

I hereby claim:

  • I am max-levitskiy on github.
  • I am funshot (https://keybase.io/funshot) on keybase.
  • I have a public key ASDciV_OMu91sBnkoiysDjyI0H2Y4ceE1RK1zXEtQozCogo

To claim this, I am signing this object:

@Max-Levitskiy
Max-Levitskiy / get-history.py
Created May 12, 2023 13:52
Get stablecoins to usd prices for one year from coingecko
import requests
import pandas as pd
import time
from datetime import datetime, timedelta
import os
from requests.exceptions import RequestException
COINS = ['tether', 'usd-coin', 'binance-usd', 'dai', 'true-usd', 'frax', 'paxos-standard', 'usdd', 'gemini-dollar', 'just-stablecoin', 'usdx', 'celo-dollar', 'fei-usd']
RATE_LIMIT = 10 # Max requests per minute
REQUEST_DELAY = 60.0 / RATE_LIMIT # Delay between requests
# Fixing error: /usr/bin/docker: 1: exec: /mnt/c/Program Files/Docker/Docker/resources/bin/docker.exe: not found
# run from cmd(admin)
mklink "C:\Program Files\Docker\Docker\resources\bin\docker.exe" "c:\ProgramData\DockerDesktop\version-bin\docker.exe"
# 1. Create new shortcut
# 2. Paste the string from last line in the location field. Check that
# 3. Replace cmd.exe to normal name (wsl-idea for example) on the next string
# 4. Optionaly, you can change an icon. For exaple: https://raw.githubusercontent.com/JetBrains/intellij-community/master/platform/icons/src/idea_CE.ico
# 5. Add this options -Dsun.java2d.xrender=true -Dremote.x11.workaround=false in ~/.config/JetBrains/IntelliJIdea*/idea64.vmoptions
C:\Windows\System32\bash.exe -c "unset BASH && source ~/.profile && ~/idea/bin/idea.sh"