Skip to content

Instantly share code, notes, and snippets.

@Markus00000
Markus00000 / gist:f4061589671580523d41
Last active August 29, 2015 14:22
Show song rating from playlist using cmus
#!/bin/bash
# Path to playlists
playlists="$HOME/music"
# Prefix and suffix strings for the playlist file name
pl_prefix=''
pl_suffix='.m3u'
# Get current song from cmus
@Markus00000
Markus00000 / gist:ad8c0ff46290f9dc2887
Last active February 24, 2023 06:23
Song ratings with playlists in cmus
#!/bin/bash
# Usage: cmus-rate [1-5]
#
# Rate tracks playing in cmus and add them to corresponding playlists.
#
# The track currently playing in cmus is added to an M3U playlist corresponding
# to the given rating ("[1-5].m3u") and removed from any other rating playlist.
# If no argument is given, the track is removed from all rating playlists.
#
# The playlists are kept sorted.
@Markus00000
Markus00000 / gist:3892479
Created October 15, 2012 13:31
dmesg linux 3.6.2
# dmesg linux 3.6.2
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.6.2-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Fri Oct 12 23:58:58 CEST 2012
[ 0.000000] Command line: root=/dev/disk/by-label/arch ro resume=/dev/disk/by-label/swap initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x00000000000913ff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000091400-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
@Markus00000
Markus00000 / gist:3892473
Created October 15, 2012 13:30
dmesg linux 3.5.6
# dmesg linux 3.5.6
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.5.6-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.1 20120721 (prerelease) (GCC) ) #1 SMP PREEMPT Sun Oct 7 19:30:49 CEST 2012
[ 0.000000] Command line: root=/dev/disk/by-label/arch ro resume=/dev/disk/by-label/swap initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x00000000000913ff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000091400-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
@Markus00000
Markus00000 / gist:3892470
Created October 15, 2012 13:29
lsmod linux 3.6.2
# lsmod linux 3.6.2
Module Size Used by
xt_hl 1369 6
ip6t_rt 2080 3
nf_conntrack_ipv6 7511 7
nf_defrag_ipv6 6273 1 nf_conntrack_ipv6
xt_LOG 12054 8
xt_limit 1977 11
xt_tcpudp 2471 24
@Markus00000
Markus00000 / gist:3892468
Created October 15, 2012 13:29
lsmod linux 3.5.6
# lsmod linux 3.5.6
Module Size Used by
xt_hl 1369 6
ip6t_rt 2112 3
nf_conntrack_ipv6 6682 7
nf_defrag_ipv6 6273 1 nf_conntrack_ipv6
xt_LOG 11943 8
xt_limit 1977 11
xt_tcpudp 2471 24