Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
#!/bin/bash | |
# Check if an argument was provided | |
if [ $# -eq 0 ]; then | |
NMAP_XML_OUTPUT="/dev/stdin" | |
else | |
NMAP_XML_OUTPUT="$1" | |
fi | |
# Use xmllint to parse IP addresses and ports from the Nmap XML output |
Always use calloc()
instead of malloc()+memset()
. In most cases, they will be the same. In some cases, calloc()
will do less work because it can skip memset()
entirely. In other cases, calloc()
can even cheat and not allocate any memory! However, malloc()+memset()
will always do the full amount of work.
Understanding this requires a short tour of the memory system.
There are four main parts here: your program, the standard library, the kernel, and the page tables. You already know your program, so...
Memory allocators like malloc()
and calloc()
are mostly there to take small allocations (anything from 1 byte to 100s of KB) and group them into larger pools of memory. For example, if you allocate 16 bytes, malloc()
will first try to get 16 bytes out of one of its pools, and then ask for more memory from the kernel when the pool runs dry. However, since the program you're asking about is allocating for a large amount of memory at once, `mal
{ | |
"background" : "#282828", | |
"black" : "#282828", | |
"blue" : "#458588", | |
"brightBlack" : "#928374", | |
"brightBlue" : "#83A598", | |
"brightCyan" : "#8EC07C", | |
"brightGreen" : "#B8BB26", | |
"brightPurple" : "#D3869B", | |
"brightRed" : "#FB4934", |
Your scrobbler might have decided to scrobble every song hundreds of times, and you can't really remove those scrobbles efficiently. Or you might have accidentally installed multiple scrobbler extensions at the same time - wondering why multiple scrobbles appear for every song played at a time - and you want to clear them after finding the issue.
Using this script still doesn't necessarily make the process quick since Last.fm only displays a limited number of scrobbles that can be removed on each page of your library. However unlike the implementation of @sk22 and its forks, this UserScript, which is derived from those scripts, is run once. The rest of the process is automated and the script will stop at the page you have set using the prompt.
Install Docker CE and nftables:
{-# language ApplicativeDo #-} | |
{-# language LambdaCase #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeInType #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE InstanceSigs #-} | |
-- not sure if this is all extensions or all these extensions are needed, just pasting from the file | |
module VerifySchema where |
#!/bin/bash | |
sudo -s <<EOF | |
zypper dup -l -y --no-recommends --allow-downgrade --allow-arch-change --force-resolution | |
flatpak update -y --noninteractive --force-remove | |
flatpak remove --unused --delete-data -y | |
#flatpak repair | |
journalctl --rotate | |
journalctl --vacuum-time=2d | |
zypper clean | |
rm -rfv /var/tmp/flatpak-cache-* |