Skip to content

Instantly share code, notes, and snippets.

View artyom-poptsov's full-sized avatar

Artyom V. Poptsov artyom-poptsov

View GitHub Profile
@artyom-poptsov
artyom-poptsov / candle.scm
Last active March 25, 2024 18:32
candle.scm
#!/usr/bin/env guile \
-L modules -e main -s
!#
;; This work is dedicated to the victims of the terrorist attack that took
;; place on March 22, 2024 at "Crocus City Hall" in Moscow.
;;
;; Copyright (C) 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;
;; Mastodon: https://fosstodon.org/@avp
@artyom-poptsov
artyom-poptsov / glitch.c
Created March 2, 2024 18:03
This is an experimental program that draws a rhomb-shaped glitch-riden object in the GNU/Linux console.
/*
Copyright (C) 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
Mastodon: https://fosstodon.org/@avp
GitHub: https://github.com/artyom-poptsov
Home page: https://memory-heap.org
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
@artyom-poptsov
artyom-poptsov / guix-build-dependent.sh
Created December 29, 2023 17:51
A simple script to rebuild all packages that depend on the specified package.
#!/bin/bash
PACKAGE="$1"
./pre-inst-env guix build $( ./pre-inst-env guix refresh --list-dependent "$PACKAGE" | awk -F: '{print $2}')
@artyom-poptsov
artyom-poptsov / sad.c
Last active December 18, 2023 05:48
sad.c
/*
Copyright (C) 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com>
Mastodon: https://fosstodon.org/@avp
Home page: https://memory-heap.org
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
@artyom-poptsov
artyom-poptsov / guile-dsv-profile.sh
Created August 7, 2023 02:21
guile-dsv-profile.sh
#!/bin/bash
OUTPUT=stat-dsv.log
for i in $(seq 10); do
/usr/bin/time -o $OUTPUT -a -f "%e" ./pre-inst-env ./utils/dsv --to rfc4180 datasets/covid.csv > test.csv
done
@artyom-poptsov
artyom-poptsov / marlin-ubl-plot.gnu
Last active July 12, 2023 08:30
Plot Marlin Universal Bed Leveling values with Gnuplot
set title "Marlin UBL mesh values"
set xlabel "X"
set ylabel "Y"
set zlabel "Z"
set grid
set label 1 "XY HOME" textcolor 'red' offset -5,0 at -1,8,-1.4 point pt 18 lc rgb 'red'
set label 1 front
@artyom-poptsov
artyom-poptsov / install-latex-lilyglyphs.sh
Created July 10, 2023 20:42
Install LaTeX Lilyglyphs on Ubuntu GNU/Linux 22.04
#!/bin/bash
cd /tmp/
wget https://mirrors.ctan.org/macros/unicodetex/latex/lilyglyphs.zip
unzip lilyglyphs.zip
sudo cp -r ./lilyglyphs/tex/* /usr/share/texmf/tex/latex/
rm lilyglyphs.zip
#!/usr/bin/guile \
-L modules -e main -s
!#
(use-modules (oop goops)
(ssh session)
(ssh auth)
(metabash plumber)
(metabash diff))
(define-syntax M#!
(syntax-rules (=>)
((_ type command)
(list (quote type) command))
((_ => type command)
`(,(list (quote type) command)))
((_ => type command rest ...)
`(,(list (quote type) command) ,@(M#! rest ...)))
((_ type command => rest ...)
(apply plumb `(,(list (quote type) command) ,@(M#! => rest ...))))))
@artyom-poptsov
artyom-poptsov / Dockerfile
Last active August 17, 2018 13:25
GNU Mediagoblin docker image
#
# Dockerized http://mediagoblin.org/
# Copyright (C) Loic Dachary <loic@dachary.org>
# Copyright (C) 2018 Artyom V. Poptsov <poptsov.artyom@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#