mplayer -endpos 00:00:30 song.mp3
I have an alarm script that loads a bunch of MP3s and starts playing them in random order in the morning. However, some songs are very long, some of them are boring, etc. So I prefer playing just the first X seconds of each song.
This tip is from here.
Gmail introduced a new feature called “people widget” that I find extremely annoying. How to get rid of it?
Go to Settings (click on the gear in the top right corner and select Mail settings). Under the General tab, you will find the People Widget. Hide it.
In this post, among the comments, you can find some alternatives. Maybe I will try them once.
When you use
sudo and you mistype your password, you can receive some insults :) Here is how to activate it:
sudo vi /etc/sudoers
- find the line that starts with “
Defaults” and append “
insults” to the end of the line. Mine looks like this: “
Defaults env_reset,insults” (without quotes, of course).
If you want to test it, just mistype your sudo password. Have fun :)
This entry is based on this post.
I had to remove all the comments from a LaTeX file.
LaTeX comments start with ‘
%‘. It was enough to remove comments that start at the beginning of a line.
cat file.tex | grep -v ^%
(Yeah, I know, it’s two processes, but I prefer like this…)
If your comments start with ‘
#‘, use “
cat file | grep -v ^#“.