Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
# Math | |
<Multi_key> <A> <A> : "∀" | |
<Multi_key> <E> <E> : "∃" | |
<Multi_key> <exclam> <E> <E> : "∄" | |
<Multi_key> <minus> <0> : "−" | |
<Multi_key> <KP_Subtract> <KP_0> : "−" | |
<Multi_key> <asterisk> <1> : "⋅" | |
<Multi_key> <KP_Multiply> <KP_1> : "⋅" |
#include <iostream> | |
#include <vector> | |
#include <tuple> | |
#include <array> | |
// s u - u - u - u | |
// | > a < X X X > c - t | |
// b v - v - v - v | |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
-
Set the buffer size (
-bufsize:v
) equal to the target bitrate (-b:v
). You want to ensure that you're encoding in CBR mode. -
Set up the encoders as shown:
template <int MAXV, class T = int> struct Dinic { | |
const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant | |
int lim = 1; | |
const T INF = numeric_limits<T>::max(); | |
struct edge { | |
int to, rev; | |
T cap, flow; | |
}; | |
int s = MAXV - 2, t = MAXV - 1; |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
ffmpeg -i in.mkv -f srt -i in.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt out.mkv |
#!/bin/bash | |
# | |
# Created by djazz // Dangershy | |
# Dependencies: feh | |
# | |
FOLDER="~/Pictures/wallpapers" | |
DELAY=10 | |
# to make it loop over lines instead of spaces in filenames |
(source: https://sites.google.com/site/rsync2u/home/rsync-tutorial/how-rsync-works3)
~/demo1$rsync is efficient. The first time rsync is run, destination is created and the full source is copied to destination. Thereafter, only changes in source are copied to destination. If the --link-dest option is used, unchanged files are hard linked to the previous backup.
A hard link is a pointer to a file. Hard links have the advantage of using very little memory. There is an illustrated explanation of hard links on http://blog.interlinked.org/tutorials/rsync_time_machine.html > scroll down to “Hard-Links”.
Here is how the "rsync --link-dest=DIR" algorithm creates files in destination:
if destination does not exists,