Skip to content

Instantly share code, notes, and snippets.

View flatlinebb's full-sized avatar
🏠
Working from home

flatlinebb

🏠
Working from home
View GitHub Profile
@flatlinebb
flatlinebb / system specs in linux
Last active April 22, 2020 19:00
How to view the system specs in linux
How to view the system specs in linux
Open terminal and type sudo dmidecode --type.
Don't click Enter yet! after --type, you can write bios or system, etc. to view the related specs.
For example: sudo dmidecode --type bios will display the BIOS specs.
Complete list of "What can I write after --type" (common parameters are in bold):
Memory
BIOS
System
@flatlinebb
flatlinebb / mpv keyboard shortcuts
Last active January 6, 2024 09:38
mpv keyboard shortcuts
Keyboard Control
LEFT and RIGHT
Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek (see --hr-seek).
UP and DOWN
Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see --hr-seek).
Ctrl+LEFT and Ctrl+RIGHT
Seek to the previous/next subtitle. Subject to some restrictions and might not always work; see sub-seek command.
Ctrl+Shift+Left and Ctrl+Shift+Right
Adjust subtitle delay so that the next or previous subtitle is displayed now. This is especially useful to sync subtitles to audio.
[ and ]
@flatlinebb
flatlinebb / smartcheck.sh
Created November 23, 2018 11:11 — forked from tommybutler/smartcheck.sh
Script to quickly scan the S.M.A.R.T. health status of all your hard drive devices in Linux (at least all the ones from /dev/sda to /dev/sdzz). You need smartctl installed on your system for this script to work, and your hard drives need to have S.M.A.R.T. capabilities (they probably do).
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
if sudo true
then
true
else
echo 'Root privileges required'
@flatlinebb
flatlinebb / network-switch-test.bat
Created November 23, 2018 08:13
Script to test network connectivity and throughput
@ECHO OFF
:top
ping 8.8.8.8
ECHO.
ECHO File start %time%
ECHO.
:: wget -O - "http://ipv4.download.thinkbroadband.com/100MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/50MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/20MB.zip"
:: wget -O - "http://speedtest-ca.turnkeyinternet.net/100mb.bin"
@flatlinebb
flatlinebb / smart-test-short-start.sh
Last active February 20, 2019 18:30
SMART Scripts
for sd in /dev/sd[a-z]; do echo $sd; smartctl -t short $sd; done
@flatlinebb
flatlinebb / watch-smart-test-status.sh
Created November 22, 2018 22:22
Monitor SMART test status with watch
watch -c -n 1 -d --exec smart-test-status-all.sh
@flatlinebb
flatlinebb / smart-test-status-all.sh
Created November 22, 2018 22:20
SMART Test Status all drives (/dev/sd[a-z])
for sd in /dev/sd[a-z]; do echo $sd; smartctl -c $sd | grep Self-test | grep -v supported; smartctl -c $sd | grep remaining; done
@flatlinebb
flatlinebb / smart-test-short-start.sh
Last active November 22, 2018 22:27
SMART Short Test Start on all drives (/dev/sd[a-z])
for sd in /dev/sd[a-z]; do echo $sd; smartctl -t short $sd; done
@flatlinebb
flatlinebb / screen_cheatsheet.markdown
Last active December 30, 2018 23:38 — forked from jctosta/screen_cheatsheet.markdown
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
@flatlinebb
flatlinebb / mpv_links.txt
Last active December 6, 2021 22:59
YouTube Playlist Links for MPV Player