Laur's blog
Sign in Subscribe
cookie

Mirror a Confluence Site

  • Laur Ivan

Laur Ivan

Oct 22, 2018 • 1 min read
Mirror a Confluence Site

TL;DR: wget has a mode capable of saving cookies.

The other day I thought it'd be interesting to have a local copy of a confluence wiki, to avoid hitting the internet every time I needed a howto. So, I've tried curl first and failed (probably my fault really). So, after a few tries, I managed to get a workflow in place.

First, we need to log in onto the site:

./wget -qO- --keep-session-cookies \
  --save-cookies cookies.txt \
  --post-data 'os_username=<user>&os_password=<user>' \
  https://site.com/confluence/login.action

Here, you need to replace the user name and password with something meaningful. Please note that text must be escaped with something like this encoder.

The command will create a file cookies.txt which will contain the session cookie. Now, all you need to do is to mirror the site:

./wget --load-cookies cookies.txt \
  -mkxKEp \
  -np \
  https://site.com/confluence/display/PROJECT/

..and presto! you have the site mirrored locally!

HTH,

Logging in Rust

Logging in Rust

I need to record the logging from my application. According to this, rust can do logging via the log crate: use log::{info, warn}; pub fn example() { info!("Here's some info"); warn!("This is a warning!"); } In addition, you can use the env_logger
May 31, 2025 1 min read
Connect MCP Server Developed in WLS to Claude

Connect MCP Server Developed in WLS to Claude

I'm developing a MCP server in WLS because I'm using WLS for development in general. I've installed Claude desktop to play around with it and I had trouble connecting my server. Short of moving the codebase to windows, this post describes what I did
May 23, 2025 2 min read
Vibe Coding - Add a field to a Qdrant collection

Vibe Coding - Add a field to a Qdrant collection

I have created a Qdrant collection off a repository of mine and I had the following payload fields: * file_name - the source code file name (path actually) * branch - the git repository branch that I have indexed * repository_name - the git repository name * chunk - the text chunk
Apr 2, 2025 2 min read
Laur's blog © 2025
  • Sign up
Powered by Ghost