Loading [MathJax]/jax/output/CommonHTML/jax.js

Wiki

A universe of ideas

User Tools

Site Tools


computer:bash_snippets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computer:bash_snippets [2019-07-31 17:06] – [Network monitoring] skrupelloscomputer:bash_snippets [2020-11-18 18:11] (current) – external edit 127.0.0.1
Line 15: Line 15:
     --playlist-end 19 \     --playlist-end 19 \
     'https://youtube.com/playlist/url'     'https://youtube.com/playlist/url'
-mkvmerge -o all_001-019.mkv id+mkvmerge -o all_001-019.mkv \[ id_{1..19}\ * \]
 mpv --save-position-on-quit all_001-019.mkv mpv --save-position-on-quit all_001-019.mkv
 </code> </code>
 +
 +<WRAP center round important 60%>
 +  * Achte auf ''['' und '']'' um die input Videos im //append// Modus zu mergen
 +  * Der glob ''*'' sortiert nicht numerisch (aber ''*(n)'' geht auch)
 +</WRAP>
 +
  
 Geeignete Formate finden: Geeignete Formate finden:
Line 27: Line 33:
 sort -nrs sort -nrs
 </code> </code>
 +
 +<WRAP center round important 60%>
 +Achte auf die Hardware-Beschleunigung (siehe ''vainfo'')
 +</WRAP>
  
 ===== Order files and directories recursive by date ===== ===== Order files and directories recursive by date =====
Line 207: Line 217:
 </FileSpec> </FileSpec>
 </code> </code>
 +
 +====== CUPS ======
 +Delete all learned Network printers:
 +<code bash>
 +lpstat -s | \grep ///dev/null | cut -c 12- | cut -d: -f1 | xargs -n1 -- lpadmin -x 
 +</code>
 +
 ====== Zu schlecht für ein dotfile ====== ====== Zu schlecht für ein dotfile ======
 Hier sind scripte, die zwar eine nette Idee, aber viel zu schlecht für ein dotfile sind. Hier sind scripte, die zwar eine nette Idee, aber viel zu schlecht für ein dotfile sind.
Line 243: Line 260:
 </code> </code>
  
 +<code>
 +smartctl -x /dev/sda
 +</code>
  
  
 +<code python>
 +for i in [2, 1.9, 1.5, 1.1, None, 0, None, -1.1, -1.5, -1.9, -2]:
 +    print('-'*105 if i is None else f'{i: .1f}: ceil = {math.ceil(i): } || round = {round(i): } | int(i+.5) = {int(i+0.5): } || floor = {math.floor(i): } | int = {int(i): } || int(i)+1 = {int(i)+1: } | int(i)-1 = {int(i)-1: }')
 +</code>
 +<code>
 + 2.0: ceil =  2 || round =  2 | int(i+.5) =  2 || floor =  2 | int =  2 || int(i)+1 =  3 | int(i)-1 =  1
 + 1.9: ceil =  2 || round =  2 | int(i+.5) =  2 || floor =  1 | int =  1 || int(i)+1 =  2 | int(i)-1 =  0
 + 1.5: ceil =  2 || round =  2 | int(i+.5) =  2 || floor =  1 | int =  1 || int(i)+1 =  2 | int(i)-1 =  0
 + 1.1: ceil =  2 || round =  1 | int(i+.5) =  1 || floor =  1 | int =  1 || int(i)+1 =  2 | int(i)-1 =  0
 +---------------------------------------------------------------------------------------------------------
 + 0.0: ceil =  0 || round =  0 | int(i+.5) =  0 || floor =  0 | int =  0 || int(i)+1 =  1 | int(i)-1 = -1
 +---------------------------------------------------------------------------------------------------------
 +-1.1: ceil = -1 || round = -1 | int(i+.5) =  0 || floor = -2 | int = -1 || int(i)+1 =  0 | int(i)-1 = -2
 +-1.5: ceil = -1 || round = -2 | int(i+.5) = -1 || floor = -2 | int = -1 || int(i)+1 =  0 | int(i)-1 = -2
 +-1.9: ceil = -1 || round = -2 | int(i+.5) = -1 || floor = -2 | int = -1 || int(i)+1 =  0 | int(i)-1 = -2
 +-2.0: ceil = -2 || round = -2 | int(i+.5) = -1 || floor = -2 | int = -2 || int(i)+1 = -1 | int(i)-1 = -3
 +</code>
computer/bash_snippets.1564585561.txt.gz · Last modified: 2020-11-18 18:10 (external edit)