Customize Your Firefox Browsing Experience On Your Favorite Websites

2010-06-23 5 min read Firefox

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category

<img SRC="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot.151.jpe" ALIGN="bottom" ALT="screenshot.15"/>Did you know that you can customize the way you see a website in your browser?  We’ve all heard of the <a HREF="http://www.makeuseof.com/tag/greasemonkey-firefox-addon/">Greasemonkey add-on for Firefox, right?  If not, check out the articles <a HREF="http://www.makeuseof.com/tag/20-must-see-greasemonkey-addonsno-technical-knowledge-req/">that <a HREF="http://www.makeuseof.com/tag/6-cool-greasemonkey-scripts-to-rock-your-friendfeed/">have <a HREF="http://www.makeuseof.com/tag/how-to-turn-greasemonkey-scripts-into-firefox-extensions/">been <a HREF="http://www.makeuseof.com/tag/top-ten-flickr-greasemonkey-scripts/">written here on MakeUseOf and you’ll be sure to find out some neat stuff about it.

Basically, Greasemonkey allows users to write and implement scripts that customize the way you interact with websites.

Continue reading

Scripts to create logins from bash command – for creating multiple accounts

2010-06-09 1 min read Fedora Linux

Heres the script:

cat «EOF > login.sh
for i in  `cat logins` ; do
login=`echo &#8221;$i&#8221;|awk -F&#8221;:&#8221; '{print $2}&#8217;`;
comment=&#8221;`echo &#8221;$i&#8221;|awk -F&#8221;:&#8221; '{print $1}&#8217;`&#8221;;
gr=&#8221;`echo &#8221;$i&#8221;|awk -F&#8221;:&#8221; '{print $3}&#8217;`&#8221;;
echo &#8221;login –» $login –Comment –» $comment  –Group –»$gr  –&#8221;;
echo &#8221;useradd -c &#8221;$comment&#8221; -d /export/home/$login -m -g $gr -s /bin/bash $login&#8221;
useradd -c &#8221;$comment&#8221; -d /export/home/$login -m -g $gr -s /bin/bash $login
done

You would need to create file called logins to store the comment, login name and the group. The group must have already been created. Here is an example of the file:

Continue reading

Menu driven ssh.

2010-05-24 1 min read Bash

I have quite a lot of servers where I need to ssh at workplace and I generally don&#8217;t remember all of them, so I wrote a simple yet useful script. In all the servers I have already copied my key so I dont need a password to login. Without much ado, here is the script.

echo &#8221;Enter the server name:&#8221;
echo &#8221;1. redhat&#8221;
echo &#8221;2. fedora&#8221;

read server

if [ &#8221;$server&#8221; = &#8221;1&#8221; ]; then
ssh amit@redhat
else if [ &#8221;$server&#8221; = &#8221;2&#8221; ]; then
ssh amit@fedora
else
echo &#8221;Not a valid choice&#8221;
fi
fi

Continue reading

bash script to change icon theme to check out all the installed themes (personal)

2010-05-19 2 min read Fedora GNOME Linux

I am really annoyed with the time that is required and the number of clicks that it takes to change the gnome icon theme. So here&#8217;s a small script that I wrote to quickly check out all the icon themes that I have in my ~/.icons folder.

#!/bin/bash
[[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1
[[ &#8221;$2&#8221; == &#8221;&#8221; ]] && (
cd ~/.icons
cont=&#8221;y&#8221;
echo &#8221;Select one of the icon themes&#8221;
echo &#8221;When you like some theme just press Ctrl+c&#8221;
for i in *
do
[[ -d $i/cursors ]] || (
echo &#8221;Now trying …. : $i&#8221;
gconftool-2 –type string -s  /desktop/gnome/interface/icon_theme &#8221;$i&#8221;
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/interface/icon_theme &#8221;$2&#8221;

Continue reading

bash script to periodically change the cursor theme.

2010-05-07 1 min read Fedora GNOME

#!/bin/bash
[[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1
[[ &#8221;$2&#8221; == &#8221;&#8221; ]] && (
cd ~/.icons
cont=&#8221;y&#8221;
echo &#8221;Select one of the icon themes&#8221;
echo &#8221;When you like some theme just press Ctrl+c&#8221;
for i in *
do
[[ -d $i/cursors ]] && (
echo &#8221;Now trying …. : $i&#8221;
gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$i&#8221;
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$2&#8221;

Continue reading

Bugzilla Automation with perl — add, update or query any bug in Bugzilla using perl and www series modules for perl.

2010-04-11 3 min read Fedora Linux

Today I was trying to do some queries and see if I could create a new bug or update a existing bug in the Bugzilla. The one that I was trying to access was on version 2.0 and not on 3.0. This being the case, the XMLRPC interface was not working properly and to top it all, I was wanted to query quite a lot of bugs. So, I went out to evaluate how to avoid the manual work and get this done faster. Here&#8217;s some of my findings:

Continue reading

bash script with sql to get the number of records from multiple tables.

2010-02-10 1 min read Bash Database Learning Linux Solaris

Here is the bash script:

#!/bin/sh
names[1]=errorlog
names[2]=amit1log
names[3]=amit2log
names[4]=amit3log
names[5]=amit4log
j=1
echo $1
for i in $( sqlplus amit/passwd@tns @get_count.sql |sed  -n &#8217;/COUNT/,/Disconnected/p&#8217;|sed &#8217;/COUNT/ d&#8217;|sed &#8217;/—/ d&#8217;|sed &#8217;/Disconnected/ d&#8217;|tr &#8217;n&#8217; &#8217; &#8217;  )
do
temp=${names[$j]}
let count=30-${#temp}
for ((I=1; I <= $count ; I++))
do
printf &#8221; &#8221;
done
echo  &#8221;${names[$j]}    : $i&#8221;
# echo $j
let j=j+1
done
echo
echo

and the required sql script:

select count() from errorlog;
select count(
) from amit1log;
select count() from amit2log;
select count(
) from amit3log;
select count(*) from amit4log;
quit;

Continue reading
Older posts Newer posts