Continue with:
killall -CONT -m firefox
Suspends all Firefox Threads. Results in Zero CPU load.
Useful when having 100+ Tabs open and you temporarily need the power elsewhere.
Be careful - might produce RACE CONDITIONS or LOCKUPS in other processes or FF itself.
matching is case sensitive.
Setting: You have a lot of jpg files in a directory.
Maybe your public_html folder which is readable on the net because of Apache's mod_userdir. All those files from the current folder will be dropped into a file called gallery.html as image tags that can be viewed within a web browser locally or or over the Internet.
Original:
find . -iname "*.jpg" -exec echo "<img src=\"{}\">" >> gallery.html \;
My take on the original: even though I like the other's use of -exec echo, sed just feels more natural. This should also be slightly easier to improve. I expanded this into a script as an exercise, which took about 35 minutes (had to look up some docs): http://bitbucket.org/kniht/nonsense/src/7c1b46488dfc/commandlinefu/quick_image_gallery.py
More compact and direct.
I tried a few curses based mp3 players for playing back choir practice songs for my wife. Unfortunately none of the ones I tried were capable of scrubbing a track. Firefox saves the day.
Access a random news web page on the internet. The Links browser can of course be replaced by Firefox or any modern graphical web browser.
This includes a title attribute so you can see the file name by hovering over an image. Also will hoover up any image format - jpg, gif and png.
sort -R randomize the list. head -n1 takes the first.
also use: update-alternatives --config gnome-www-browser
Just feed classical duckduckgo request replacing the "!" for the bang by a "-" (ie. "ddg -gi mickey mouse") and the result will be opened in w3m (think of installing w3m-img for image support in xterm or tty) To put it in the .bashrc, remove the "\" that escapes the "!".
Use duckduckgo from terminal:
ddg commandline one liners
Want Google instead? :P
lmgtfy(){ ARGS="$@"; xdg-open "http://www.lmgtfy.com/?q=${ARGS}#"; }
lmgtfy "What the f*** is lmgtfy?"
Or just:
google(){ ARGS="$@"; xdg-open "https://www.gooogle.com/search?q=${ARGS}"; }
google Please Google, take my soul
KISS
To get a random xkcd comic:
xdg-open http://dynamic.xkcd.com/random/comic/
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: