#Splitting an image in half for dual monitors (a 50/50 horizontal split)
convert – crop 50%x100% +repage original_image.png output_image.png
(multiple output_image names are allowed..eg. output_left.png output_right.png)
(swap to 100%x50% to split in half vertically).
#Use Google Translate to speak text you type in the terminal
Create a .sh file – filename.sh
Edit to include the following:
!/bin/bash
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols “http://translate.g$
say $*
Save the file and make it executable with (chmod u+x filename.sh)
To run the command use the following format:
filename.sh This is the text I want to hear
#Text-to-Speech shennanigans
install alsa-utils
add “snd_bcm2835” to /etc/modules #no quotation marks needed!
install TTS (libttspico-utils)
output speech directly and/or to file
pico2wave -w myoutputfilename.wav “This is the text I want to say or save to file” && aplay myoutputfilename.wav
(Initially the text will be saved to the .wav…the && aplay is required to verbose that file afterwards.)
#Rip Audio from a video file using FFMPEG
ffmpeg -i videoname.mp4 -f mp3 -ab 192000 -vn musicname.mp3
#Play Video as ASCII using mplayer
mplayer -vo caca file/to/play.mp4
#Display the status of dd as it runs
(Addition of status=progress)
sudo dd if=/dev/sdX of=~/path/to/output/img.img bs=4M status=progress
#Append text from one file into another
cat file1.txt >> file2.txt
(The text in file1.txt is added to the bottom of file2.txt)
#Output desired text from commands using awk and pipes
example: refine nordvpn status command to just show connection status & current server (for i3 blocks?)
nordvpn status | awk ‘/^Status:/ {print “VPN Status = ” $2}’
output = VPN Status = Connected
nordvpn status | awk ‘/^Current server:/ {print “Current Server = ” $3}’
Current Server = exampleserver0000.nordvpn.com
example: Get a condensed memory overview from the “free -h” command
free -h | awk ‘/Mem:/ {print “Current Memory usage: ” $3 “/” $2}’
output = Current Memory usage: 2.8G/15G
#Rip audio only from a Youtube video using youtube-dl
substitute mp3 for desired format.
youtube-dl -x –audio-format mp3 https://www.youtube.com/watch?v=Z1nk_bQU3EM