User Tools

Site Tools


linux

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
linux [2024/01/14 20:14] ninelinux [2026/04/26 13:41] (current) – [iptables/netfilter] nine
Line 8: Line 8:
  
 ===== iptables/netfilter ===== ===== iptables/netfilter =====
 +
  
 Restrict to single host, e.g. for prometheus node exporter Restrict to single host, e.g. for prometheus node exporter
 +  # required for persisting rules
 +  apt-get install iptables-persistent
 +  
 +  # set rules
   iptables -N prometheus     iptables -N prometheus  
   iptables -A prometheus --src <server-ip> -j ACCEPT   iptables -A prometheus --src <server-ip> -j ACCEPT
Line 15: Line 20:
   iptables -I INPUT -m tcp -p tcp --dport 9100 -j prometheus   iptables -I INPUT -m tcp -p tcp --dport 9100 -j prometheus
      
 +  # save persistent
 +  iptables-save | tee /etc/iptables/rules.v4
 +
 ===== docker ===== ===== docker =====
  
Line 22: Line 30:
  
  
 +===== vim =====
  
 +
 +disable visual mode:
 +
 +  set mouse-=a
 +or
 +
 +  set mouse=nicr
 +
 +
 +===== Firefox =====
 +
 +  widget.non-native-theme.scrollbar.style
 +
 +  * 0: Standard-Stil der Plattform
 +  * 1: macOS
 +  * 2: GTK
 +  * 3: Android
 +  * 4: Windows 10
 +  * 5: Windows 11
 +
 +  widget.non-native-theme.scrollbar.size.override
 +
 +===== email =====
 +
 +==== sender guidelines ====
 +
 +  - https://support.google.com/a/answer/14229414
 +  - https://senders.yahooinc.com/best-practices/
 +  - https://senders.yahooinc.com/faqs/
 +  - https://www.bsi.bund.de/dok/TR-03182 
 +
 +==== pdf ====
 +
 +default:
 +  ps2pdf input.pdf output.pdf
 +
 +ghostscript options -dPDFSETTINGS
 +  ps2pdf -dPDFSETTINGS=/ebook input.pdf output.pdf
 +
 +possible options:
 +  -dPDFSETTINGS=/screen (72 dpi)
 +  -dPDFSETTINGS=/ebook (150 dpi)
 +  -dPDFSETTINGS=/prepress (300 dpi)
 +  -dPDFSETTINGS=/printer (300 dpi)
 +  -dPDFSETTINGS=/default Selects the output which is useful for multiple purposes. Can cause large PDFS.
 +
 +=== remove password ===
 +
 +  pdftk input.pdf input_pw "$PASSWORD" output out.pdf
 +
 +===== Video =====
 +
 +compress video for email sending
 +
 +  ffmpeg -i input.mp4 output_compressed.mp4
 +
 +adjust volume 
 +  ffmpeg -i input.avi -af "volumedetect" -vn -sn -dn -f null /dev/null
 +  
 +gives:
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] n_samples: 1839104
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] mean_volume: -43.4 dB
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] max_volume: -31.5 dB
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] histogram_31db: 64
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] histogram_32db: 455
 +  [Parsed_volumedetect_0 @ 0x55f12ff28780] histogram_33db: 1884
 +
 +
 +increase max volume:
 +  ffmpeg -i input.avi -af "volume=30dB" -c:v copy -c:a libmp3lame -q:a 2 output.mp4
 +  
 +  
 +flip image
 +  ffmpeg -i input.mp4 -vf "transpose=2" output.mp4
 +  
 +transpose options:
 +  0 = 90° counter-clockwise and vertical flip (default)
 +  1 = 90° clockwise
 +  2 = 90° counter-clockwise
 +  3 = 90° clockwise and vertical flip
  
linux.1705263297.txt.gz · Last modified: 2024/01/14 20:14 by nine