Check These Out
Perl is installed by default on most modern OS when jot is not.
Ran as the postgres user, dumps each database individually. It dumps with the create statements as well, so you can just 'zcat $x-nightly.dmp.gz | psql' to reimport/recreate a database from a backup.
eh stands for Edit History
.
Frequently, I'll mistype a command, and then step back through my history and correct the command. As a result, both the correct and incorrect commands are in my history file. I wanted a simple way to remove the incorrect command so I don't run it by mistake.
.
When running this function, first the ~/bash_history file is updated, then you edit the file in vi, and then the saved history file is loaded back into memory for current usage.
.
while in vi, remember that `Shift-G` sends you to the bottom of the file, and `dd` removes a line.
.
this command is different than bash built-in `fc` because it does not run the command after editing.
This command allow you to ignore certain directories on SVN commands, like SVN STATUS. It is sad see a lot of temporary files from templates_c for each "svn status", no? ;-)
This works only on directories under revision control.
After typing cd directory [enter] ls [enter] so many times, I figured I'd try to make it into a function. I was surprised how smoothly I was able to integrate it into my work on the command line.
Just use cdls as you would cd. It will automatically list the directory contents after you cd into the directory. To make the command always available, add it to your .bashrc file.
Not quite monumental, but still pretty convenient.
works well in crontab.
Appends the input file with the date format YYYY-MM-DD.bak. Also runs silently if you remove the -v on the cp at the end of the function.
you can use any common video format. if you don't need to change the size of gif output, just remove `-vf scale=320:-1`
btw, 320:-1 means width is 320px and height would be set automatically