Email yourself a quick message
$ mailme(){ mailx -s "$@" $USER <<< "$@"; }
Usage: mailme message
This is a useful function if you want to get notified about process completion or failure. e.g.
mailme "process X completed"
View this command…
$ mailme(){ mailx -s "$@" $USER <<< "$@"; }
Usage: mailme message
This is a useful function if you want to get notified about process completion or failure. e.g.
mailme "process X completed"
View this command…
$ stap -v strace.stp -c /path/to/command
The stap script is :
#! /usr/bin/env stap
probe syscall.* {
if (pid() == target())
printf(“%s %s\n”, name, argstr);
}
View this command to comment, vote or add to favourites
View all commands …
$ grep -c ^processor /proc/cpuinfo
this works for a Linux based system, other UNIX systems may have other way(s) to check the number of CPUs.
View this command to comment, vote or add to favourites
View all commands by gerard
by David Winter…
$ wvPDF test.doc test.pdf
sudo apt-get install wv tetex-extra ghostscript
View this command to comment, vote or add to favourites
View all commands by anhpht
by David Winterbottom (codeinthehole.com)
$ oowriter -pt pdf your_word_file.doc
sudo apt-get install cups-pdf
View this command to comment, vote or add to favourites
View all commands by anhpht
by David Winterbottom (codeinthehole.com)
$ feh –bg-scale /path/to/wallpaper.jpg
View this command to comment, vote or add to favourites
View all commands by RanyAlbeg
by David Winterbottom (codeinthehole.com)
$ diffxml() { diff -wb <(xmllint –format "$1") <(xmllint –format "$2"); }
Diffs two xml files by formatting them first using xmllint and then invoking diff.
Usage: diffxml XMLFile1 XMLFile2
View this command to comment,…
$ upto() { cd "${PWD/\/$@\/*//$@}" }
Usage: upto directory
View this command to comment, vote or add to favourites
View all commands by sharfah
by David Winterbottom (codeinthehole.com)
$ jda() { cd $(pwd | sed "s/\(\/$@\/\).*/\1/g"); }
View this command to comment, vote or add to favourites
View all commands by saibbot
by David Winterbottom (codeinthehole.com)
$ find . -iname pom.xml -type f -exec bash -c "cat {} | sed s/1\.0\.46\-SNAPSHOT/1\.0\.48\-SNAPSHOT/g > {}.tmp " \; -exec mv {}.tmp {} \;
When a large maven release goes wrong, by deploying just some of the artifacts letting others behind,…