svn

========================================
        Subversion (SVN) Cheatsheet
========================================

Checkout
  svn checkout URL [url]

Update working copy
  svn update

Commit changes
  svn commit -m "Changes description"

Working copy status
  svn status

Show diff
  svn diff

Show diff with colors (requires colordiff package)
  svn diff | colordiff

Add new file
  svn add file

Copy file
  svn copy file

Delete file
  svn delete file

Rename / move file
  svn move old_name new_name

Show log (history)
  svn log [file]

Revert local changes
  svn revert file
  svn revert -R directory (recursively)

Download Gravatar image from CLI

First you need to compute hash of your e-mail.

echo -n "[email protected]" | sha256sum

Than you can download it using curl. Replace HASH with the output from the previous command.

curl -fL "https://www.gravatar.com/avatar/HASH?s=500&d=404" -o avatar.jpg

Parameters

  • s=500 (Gravatar supports 1–2048px size)
  • d=404 (If there is no image return HTTP 404)
  • r=pg|r|x (To change rating)

See more information on Gravatar docs.

Replace text in multiple files

Using find and sed a text in multiple files can be replaced using a one liner. If you have GIT bash you can do it in Windows too.

In the example below address of old.server.com will be replaced with new.server.com in all Web.config files.

find /c/inetpub/wwwroot -name "Web.config" -exec sed -i 's/old.server.com/new.server.com/g' {} +

Upgrade Debian 11 to Debian 12

I use those steps on LXC virtual in Proxmox:

  1. Make sure all packages are upgraded: apt update && apt upgrade
  2. Backup container in Proxmox
  3. Edit release version: sed -i'.bak' 's/bullseye/bookworm/g' /etc/apt/sources.list
  4. Update other configuration files in /etc/apt/sources.list.d/ appropriately
  5. Update packages index: apt update
  6. Do minimal system upgrade: apt upgrade --without-new-pkgs
  7. Do full upgrade: apt full-upgrade
  8. Restart the system: reboot

See detailed instructions here.