download YouTube mp3 using yt-dlp

January 28th, 2024
yt-dlp --keep-video --no-mtime --extract-audio --audio-format mp3 'https://www.youtube.com/watch?v=xxxxxxxxx'

flush nftables configuration

November 2nd, 2022
~# nft flush ruleset

dump nftables configuration

November 2nd, 2022
~# nft list ruleset

JOE editor key control commands

August 22nd, 2021

undo ^ü OR ^_
redo ^6

create openssl hash link for certificate file

October 28th, 2013
cd /etc/ssl/certs
ln -s root_ca.crt $(openssl x509 -noout -hash -in root_ca.crt).0

Generating ECDSA key with gpg

August 8th, 2013
/usr/src/gnupg-2.1.0beta3# ./g10/gpg2 --gen-key --expert
gpg (GnuPG) 2.1.0beta3; Copyright (C) 2011 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
   (7) DSA (set your own capabilities)
   (8) RSA (set your own capabilities)
   (9) ECDSA and ECDH
  (10) ECDSA (sign only)
  (11) ECDSA (set your own capabilities)
Your selection?

error: Incomplete maildomain | pine | alpine

August 8th, 2013

error: Incomplete maildomain
application: pine, alpine
resolution: You need to put an fqdn to your hostname in /etc/hosts file.

example, if your hostname is foo and you got this error:

[Incomplete maildomain "foo".]

you need to put an fqdn (foo.com in this example) to your hostname (foo) in your /etc/hosts file.

127.0.0.1 foo foo.com

How could I split mp3 to multiple tracks with ffmpeg?

August 6th, 2013
ffmpeg -i in.mp3 -f segment -segment_time 1800 -map 0 -codec copy out%03d.mp3

segment_time: seconds

How to remove ANSI escape sequences

July 15th, 2013
alias stresc='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"'

record / save asf stream with mplayer

July 7th, 2013
mplayer -dumpstream mms://url?MSWMExt=.asf