Skip to content

Instantly share code, notes, and snippets.

View Dmdv's full-sized avatar
🌏
Go, Rust, C++, Cosmos SDK, CosmWasm, Solidity

dmdv Dmdv

🌏
Go, Rust, C++, Cosmos SDK, CosmWasm, Solidity
  • Hong Kong
View GitHub Profile

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
@Dmdv
Dmdv / Kamino_lending_idl.json
Last active March 10, 2025 19:38
Kamino_lending_idl
{
"version": "1.11.0",
"name": "kamino_lending",
"instructions": [
{
"name": "initLendingMarket",
"accounts": [
{
"name": "lendingMarketOwner",
"isMut": true,
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
data:
redis.conf: |
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
# Source: https://gist.github.com/0466cff59d08cabb5276f593ca2e513d
#########################################
# Skaffold #
# How to Build and Deploy In Kubernetes #
# https://youtu.be/qS_4Qf8owc0 #
#########################################
#########
# Setup #
// Please find the full, tested version in
// https://github.com/influxdata/influxdb_iox/blob/fe155e15fb2ad166aee66b0458e63c24a8128dd4/query/src/exec/task.rs#L101-L118
pub struct DedicatedExecutor {
state: Arc<Mutex<State>>,
}
/// Runs futures (and any `tasks` that are `tokio::task::spawned` by
/// them) on a separate Tokio Executor
struct State {
@Dmdv
Dmdv / main.zig
Created February 2, 2023 05:58
Zig http server
const std = @import("std");
const http = @import("std").http;
const listen_options = .{
.addr = .{ .ip_version = http.IPVersion.IPv4, .ip = .{ .v4 = .{ .addr = .{ .data = [127, 0, 0, 1] } } } },
.port = 8080,
};
const server = try http.Server.listen(listen_options);
sudo log show --style syslog --last 1d | awk '/Enter/ && /unlockUIBecomesActive/ {print $1 " " $2}'
@Dmdv
Dmdv / Startup.cs
Created October 10, 2022 08:28 — forked from GiorgioG/Startup.cs
Snake Case support for Swashbuckle w/ ASP.NET Core 3.0
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// ...
services.AddControllers().AddJsonOptions(options =>
{
options.JsonSerializerOptions.PropertyNamingPolicy = new SnakeCasePropertyNamingPolicy();
});
@Dmdv
Dmdv / fsharp-tutorial.fs
Created September 30, 2022 11:24 — forked from odytrice/fsharp-tutorial.fs
F# Code Samples
// This sample will guide you through elements of the F# language.
//
// *******************************************************************************************************
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive".
// You can open the F# Interactive Window from the "View" menu.
// *******************************************************************************************************
// For more about F#, see: