Skip to content

Instantly share code, notes, and snippets.

@xemle
xemle / index.html
Created July 16, 2025 20:13
UnoCSS Runtime in Web Component with Tailwind Reset
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>UnoCSS Runtime in Web Component with Tailwind Reset</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@unocss/reset/tailwind.min.css" />
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime"></script>
</head>
<body un-cloak class="bg-green-200">
@xemle
xemle / borg-concat-segments.sh
Created February 5, 2021 21:42
Concat borg segments to larger segments and reset their numbers
#!/bin/bash
#
# Concat borg segments to larger segments and reset their numbers
#
# As usecase I concatenated my 5MB segments to 128MB segments
#
# Each borg semenent is a list of entry logs prefixed by "BORG_SEG" magic
# header. They can be concatenated by removing the magic header but the first
# original segment. The segments must preserve their original natural order.
#
@xemle
xemle / borg-migrate-segments.sh
Created July 23, 2017 11:21
Reorder borg (borgbackup) segments if core repository config segments_per_dir was changed
#!/bin/sh
if [ -z "$BORG_REPO" ]; then
echo "BORG_REPO not set. Export variable like:"
echo "export BORG_REPO=/mnt/borg"
exit 1
fi
BORG_REPO=$(readlink -f "$BORG_REPO")
if [ ! -e "$BORG_REPO/config" ]; then
echo "Invalid BORG_REPO dir: $BORG_REPO"