Tuesday, March 2nd, 2010
Today’s Bash tip. Create a prompt that changes face depending on the return code of your last command. As long as the return code is OK you get a happy face. When it is false you get a sad one.
Open and edit the .bashrc file in your home directory and enter the following:
PS1="\u@\h:\[\e[33m\]\w\[\e[0m\] \[\`if [[ \$? = "0" ]]; \
then echo '\e[32m=)\e[0m'; else echo '\e[31m=(\e[0m' ; fi\`\] \$ "
Have fun.
Tags: bash, colour, face, interactive, linux, prompt, return value, shell, tips, tricks
Posted in English | No Comments »
Thursday, August 7th, 2008
Here are some of my favourite GreaseMonkey scripts for Flickr that I use almost daily:
- Flickr Refer Comment
- This script allows you to put a small signature when commenting pictures that tells the people where you found the picture. It is a very nice feature and tells people where you are finding their pictures when you comment them – which group, if you are reading through RSS aggregator, in your friends and family collections and so on.
- Flickr Buddy Icon Reply
- This script allows you to reply with a buddy icon and / or name so that people know who you are responding to when making a follow up comment. Lovely script!
- Flickr – Multi Group Sender
- This script allows you to pick from a list all the groups you wish to send a photo to. Normally you have to pick one group at a time and from the organiser you can only send a nuber of photos to one group at a time but with this you can send one photo to several groups at the same time.
In order to use any of them you must first install Greasmonkey, a scripting add-on for Firefox that also can be gotten to work with Internet Explorer.
Tags: browser, buddy icon, comment, experience, firefox, Flickr, greasemonkey, group sender, hack, internet, referrer, script, Technical, tips, tricks, user
Posted in English | No Comments »