1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

klem: update paste scripts to use 4d2.org, remove ix.io (which is offline)

This commit is contained in:
2024-12-29 11:45:19 +01:00
parent 5c87fd6cd4
commit b5927a5217

View File

@@ -16,27 +16,28 @@
klem = niveumPackages.klem.override { klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem"; config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
config.scripts = { config.scripts = {
"p.r" = pkgs.writers.writeDash "p.r" '' "p.r paste" = pkgs.writers.writeDash "p.r" ''
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \ ${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
| ${pkgs.coreutils}/bin/tail --lines=1 \ | ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/' | ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
''; '';
# "envs.sh host" = pkgs.writers.writeDash "envs-host" '' "envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
# ${pkgs.curl}/bin/curl -F "file=$(${pkgs.coreutils}/bin/cat)" https://envs.sh ${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
# '';
"envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
''; '';
# this segfaults
# "envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
# ${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
# '';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" '' "envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh ${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
''; '';
"ix.io" = pkgs.writers.writeDash "ix.io" '' "go.r shorten" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
'';
"go.r" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)" ${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
''; '';
"0x0.st" = pkgs.writers.writeDash "0x0.st" '' "4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
'';
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)" ${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
''; '';
"rot13" = pkgs.writers.writeDash "rot13" '' "rot13" = pkgs.writers.writeDash "rot13" ''