Skip to content

Instantly share code, notes, and snippets.

@dtomvan
dtomvan / Dockerfile
Created November 26, 2024 19:39
alpine-guix-docker
# src/Dockerfile
# ==============
# Copyright (c) 2020 alpine-guix authors.
# This file is part of the *alpine-guix* project.
# alpine-guix is a free software project. You can redistribute it and/or
# modify if under the terms of the MIT License.
# This software project is distributed *as is*, WITHOUT WARRANTY OF ANY
# KIND; including but not limited to the WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE and NONINFRINGEMENT.
# You should have received a copy of the MIT License along with
@dtomvan
dtomvan / planify-json-export.jq
Created October 12, 2024 12:27
Planify converter from JSON backup file to markdown
.projects as $p
| .sections as $s
| .items
| map(select(.completed_at == ""))
| group_by(.project_id)
| map([
"# \(.[0].project_id as $id | $p | map(select(.id == $id))[0].name)",
(group_by(.section_id) |
map(
[

aspe:keyoxide.org:FXJLVGFWDX3VIKJQ2Q32GCGLSA

@dtomvan
dtomvan / sxiv.sh
Created January 21, 2024 17:33
Wrapper for `sxiv -`
#!/usr/bin/env bash
# When used as drop-in script, sxiv can now also read an image from stdin
# through `sxiv -`. Would've solved xyb3rt/sxiv#250.
# To use: write to /usr/local/bin/sxiv and chmod a+x.
# Note: this doesn't guarantee the input args are correct, it just separates
# files from options.
TEMP=$(getopt -o "A::abce::fG::g::hin::N::opqrS::s::tvZz::" -n sxiv -q $@)
if [ $? -ne 0 ]; then
@dtomvan
dtomvan / kickstart.sh
Last active August 16, 2024 09:36
Installs kickstart.nvim
#!/usr/bin/env bash
set -euo pipefail
[ -d ~/.config/nvim/ ] && echo "Backing up existing .config/nvim to appname nvim-old" && mv -v ~/.config/nvim ~/.config/nvim-old
[ -d ~/.local/share/nvim/ ] && echo "Backing up existing .local/share/nvim to appname nvim-old" && mv -v ~/.local/share/nvim ~/.local/share/nvim-old
echo "Installing kickstart.nvim"
git --version || (echo "GIT not found. Please install it https://git-scm.com/downloads" && exit 1)
git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim
echo "Successfully downloaded your new config!"

Keybase proof

I hereby claim:

  • I am dtomvan on github.
  • I am dtomvan (https://keybase.io/dtomvan) on keybase.
  • I have a public key ASBUa0ScFkkKpj9tRie3P6e1oU_Hy0sTnGhWfbt7SrAKDAo

To claim this, I am signing this object:

@dtomvan
dtomvan / solar-tweaks-updater.sh
Last active May 14, 2022 15:19
Updater for Solar Tweaks for Arch Linux.
#!/bin/bash
bail() {
echo "$@"
echo "Fatal error occured. Exiting."
exit 1
}
echo "Solar Tweaks installer for Arch Linux"
echo "-------------------------------------"
@dtomvan
dtomvan / archgrub.sh
Created August 6, 2021 17:08
Arch install
#!/bin/sh
set -e
ls /sys/firmware/efi/efivars && systemctl start iwd && iwctl
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error
echo "/dev/sda1: efi sys 200mib; /dev/sda2 swap 4gib; /dev/sda3 ext4 the rest"
parted --script /dev/sda \
mklabel gpt \
mkpart primary fat32 1MiB 200MiB \
set 1 esp on \
mkpart primary linux-swap 200MiB 4296MiB \

Keybase proof

I hereby claim:

  • I am 18gatenmaker on github.
  • I am dtomvan (https://keybase.io/dtomvan) on keybase.
  • I have a public key ASBKaai3R-6wC771p4VHKFQSbw1GMcF5pJAXw1ewaG-b5Ao

To claim this, I am signing this object: