Skip to content

Instantly share code, notes, and snippets.

View dividedmind's full-sized avatar

Rafał Rzepecki dividedmind

  • Wrocław, Poland
View GitHub Profile
@dividedmind
dividedmind / large-appmaps.md
Last active October 21, 2025 14:31
Handling large AppMaps

Handling large AppMaps

This guide shows how to deal with large AppMaps on an example of Spring PetClinic.

First, let's clone the application and open it in VSCode

$ git clone -b demo/large-appmaps https://github.com/getappmap/spring-petclinic.git
$ cd spring-petclinic
$ code .
@dividedmind
dividedmind / navie-cheat-sheet.md
Created October 14, 2025 15:04
Navie AI Assistant Cheat Sheet

Navie AI Assistant Cheat Sheet

Navie is your AI partner for code understanding, generation, and review. It uses the runtime context from AppMap and the code context from your project to provide intelligent assistance directly in your IDE.

How Navie Understands Your Code

Navie has two primary ways of understanding the code you want to discuss:

1. By Name (The Common Method)

A Guide to AppMap Recording Methods

AppMap is a powerful tool that helps developers understand and debug their code by recording its runtime behavior. This guide details the four primary methods for recording AppMap data: test recording, request recording, remote recording, and process recording. Understanding these methods will enable you to choose the most effective approach for your specific needs.

1. Test Recording

What it entails: Test recording is the most common and often recommended method for generating AppMaps. It integrates with your existing testing frameworks (like JUnit or TestNG for Java) to automatically create an AppMap for each test case that is executed. The AppMap agent is enabled when you run your tests, and it captures the code execution, including method calls, parameters, return values, and interactions with external services like databases and web services.

When to use it:

@dividedmind
dividedmind / appmap-java-cheatsheet.md
Last active September 26, 2025 17:00
AppMap Java cheat sheet

AppMap Java Cheat Sheet

This is a quick reference guide for using the AppMap agent for Java.

Setup and Installation

The AppMap agent is a .jar file that attaches to the JVM. The AppMap IDE extensions (for VS Code or IntelliJ) will automatically download it for you. You can also use the Maven or Gradle plugins.

IntelliJ IDEA

@dividedmind
dividedmind / appmap-python-cheatsheet.md
Created September 23, 2025 15:41
AppMap Python cheat sheet

AppMap Python Cheat Sheet

This is a quick reference guide for using the AppMap agent for Python.

Installation

Install the appmap package into your project's virtual environment.

pip:

@dividedmind
dividedmind / appmap-diff.md
Last active October 25, 2020 14:01
Simple execution trace diff with AppLand

Simple execution trace diff

At AppLand we're currently working on ways in which we can visualize how changes to the code affect program design and execution. But it turns out you don't need any fancy visuals to be able to tell something useful.

(BTW, see the whole code gallery!)

If you're not familiar with AppLand, at the very basic level, it allows you to record program execution traces. These traces can then be processed to surface interdependencies between code artifacts (such as classes, objects

@dividedmind
dividedmind / restclient_log.script
Created March 11, 2019 16:28
Example conjur CLI session using RESTCLIENT_LOG
$ RESTCLIENT_LOG=stderr conjur authn login
Enter your username to log into Conjur: admin
Please enter your password (it will not be echoed):
RestClient.get "https://cuke-master/authn/cucumber/login", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "User-Agent"=>"rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.1p111"
# => 200 OK | text/html 55 bytes
Logged in
$ RESTCLIENT_LOG=stderr conjur variable values add vaultName/lob8/safe_0/obj_832/password secret123
RestClient.post "https://cuke-master/authn/cucumber/admin/authenticate", "3j1aqpew0f2m02njp46c1pg0rft1j23r8a2zx878p3q5nb251njvkqh", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"55", "Content-Type"=>"text/plain", "User-Agent"=>"rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.1p111"
# => 200 OK | application/json 568 bytes
RestClient.post "https://cuke-master/secrets/cucumber/variable/vaultName%2Flob8%2Fsafe_0%2Fobj_832%2Fpassword", "secret123", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Token token=\"e
describe "Foo" do
before do
allow_any_instance # ... user thing
allow_any_instance_of(Event).to receive(:resource_visible) { resource_visible }
end
let(:perform!) { get "etc" }
context "with an event invisible to both" do
let(:resource_visible) { true }
@dividedmind
dividedmind / modbuilder.rb
Created September 1, 2015 13:26
Fake multiple inheritance example
class ModBuilder
def initialize path
@path = path
@files = []
end
def build! build_path
puts "building #{self.class.name} in #{build_path}"
build_mod_files!
puts "Files: #{@files}"
@dividedmind
dividedmind / logjam-fix.sh
Last active August 29, 2015 14:24
Logjam hotfix for older Conjur servers
#!/bin/bash -e
#
# Conjur servers older than v4.4.1 might be susceptible to Logjam attack
# (see weakdh.org for details). While the feasibility of such an attack is
# partly mitigated by network architectures Conjur is typically deployed into,
# the following script allows patching older appliances without upgrading to
# the new version.
#
# To apply the hotfix use `logjam-fix.sh apply`:
# $ wget https://gist.githubusercontent.com/dividedmind/aa32c62508ceefb8186e/raw/logjam-fix.sh