To get all the pictures of girls in a batch from OARS,
download the msharma or equivalent query page in html format. Name it code.html
Then run the code below
awk '/oa.cc.iitk.ac.in/' code.html |awk -F "img src=\"" '{print $2}'|awk -F "\"" '{print $1}'>picslist.dat
mkdir pics;cd pics
for i in `cat ../picslist.dat`;do wget $i >/dev/null 2>&1;done
rm -f ../picslist.dat
Wednesday, November 2, 2011
Tuesday, November 1, 2011
Unable to locate theme engine in module_path: “pixmap”
I got the following error in gnuplot
Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”
To solve this install gtk2-engines-pixbuf
sudo apt-get install gtk2-engines-pixbuf
Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”
To solve this install gtk2-engines-pixbuf
sudo apt-get install gtk2-engines-pixbuf
Friday, August 12, 2011
sound stopped working in ubuntu 10.10 suddenly
I have a Dell Inspiron 1525, and sound problems have been very common. In Windows XP the OS used to frequently stop detecting the Intel HDA, and I used to get no devices found errors. After installing ubuntu, I did not get it for a couple of years. Until today.
Check whether you're getting sound with windows, if you dual boot. This is why you should dual boot, it gives you idea about hardware and software problems. In my case, to start off, sound was not working in windows too.
So I run the boot-diagnostics. This is by pressing Fn-power instead of power, or choosing diagnostics from the boot options menu by pressing F12.
I notice that the standard thing that used to come up is gone. Weird. Now I get loads of memory checks, with no sound check options. Anyway, after the checks, I restart windows, and sound works!
I download the diagnostics software from the dell website. This is priceless. I run this, and it does detect the sound, as always. It's just not running in Ubuntu.
Turns out it was an ALSA issue. All I needed to do was reinstall the alsa files. Run this, in fact -
sudo add-apt-repository ppa:ricotz/unstable; sudo apt-get update; sudo apt-get --reinstall install alsa-base alsa-utils; killall pulseaudio; rm -r ~/.pulse*
However, this is for maverick, and so please check this website -
https://help.ubuntu.com/community/SoundTroubleshootingProcedure
Sound is back now!
Check whether you're getting sound with windows, if you dual boot. This is why you should dual boot, it gives you idea about hardware and software problems. In my case, to start off, sound was not working in windows too.
So I run the boot-diagnostics. This is by pressing Fn-power instead of power, or choosing diagnostics from the boot options menu by pressing F12.
I notice that the standard thing that used to come up is gone. Weird. Now I get loads of memory checks, with no sound check options. Anyway, after the checks, I restart windows, and sound works!
I download the diagnostics software from the dell website. This is priceless. I run this, and it does detect the sound, as always. It's just not running in Ubuntu.
Turns out it was an ALSA issue. All I needed to do was reinstall the alsa files. Run this, in fact -
sudo add-apt-repository ppa:ricotz/unstable; sudo apt-get update; sudo apt-get --reinstall install alsa-base alsa-utils; killall pulseaudio; rm -r ~/.pulse*
However, this is for maverick, and so please check this website -
https://help.ubuntu.com/community/SoundTroubleshootingProcedure
Sound is back now!
Sunday, May 29, 2011
Gimp batch image processing
Hi,
If you need to process images in batches, like resize a lot of images, here's a nice way to do it
1. Download David's batch processor. To do this, install 'gimp-plugin-registry' form synaptic.
2. Go to Filters>Batch and run it. Select the photos and the output folder in rename. Then apply the operation you want.
If you need to process images in batches, like resize a lot of images, here's a nice way to do it
1. Download David's batch processor. To do this, install 'gimp-plugin-registry' form synaptic.
2. Go to Filters>Batch and run it. Select the photos and the output folder in rename. Then apply the operation you want.
Sunday, May 15, 2011
batch code to change extension
for i in `ls *.JPG`;do f=${i%%.*};cp $i "$f".jpg;done
Just replace the jpg to whatever you want
Just replace the jpg to whatever you want
Sunday, May 8, 2011
How to install 64 bit flash
#Copy this in a file and run it in terminal
#!/bin/bash
## First we make the working directory
sudo mkdir -p /tmp/pluginstall &> /dev/null
#choose version of ubuntu
#Input code browser
function strinput {
unset refstr
echo -n "$1"
read refstr
}
## Ask if they agree to file bug reports, sort of a reminder
echo
echo "This script is used to setup 64-bit Adobe Flash 10 Square."
echo ""
echo "By downloading the software listed below, I acknowledge that I have read and agreed to the terms of the Flash Player 'Square' License, the Adobe.com Terms of Use and the Adobe Online Privacy Policy."
echo "See http://labs.adobe.com/technologies/eula/flashplayer10.html"
echo ""
echo " Do you agree? yes or no : "
if [ "$installtype" = "" ]
then
echo -n "(please type the whole word in lower case letters)"
strinput
else
refstr=$installtype
fi
if [ "$refstr" = "yes" ]
then
echo "Flash installing."
## First we uninstall and remove all the existing flash packages
# No longer trying to reply nspluginwrapper since Acrobat Reader 9 requires it
#sudo apt-get -y purge nspluginwrapper
sudo apt-get -y purge mozilla-plugin-gnash
sudo apt-get -y purge swfdec-mozilla
sudo apt-get -y purge flashplugin-nonfree
#sudo rm -rfd /usr/lib/nspluginwrapper
sudo rm -f /usr/lib/firefox-addons/plugins/libflashplayer.so
sudo rm -f /usr/lib/mozilla/plugins/libflashplayer.so
sudo rm -f /usr/lib/mozilla/plugins/flashplugin-alternative.so
sudo rm -f /usr/lib/mozilla/plugins/npwrapper*flash*so
rm -f ~/.mozilla/plugins/*flash*so
## What is current version?
export version="2_p3_64bit_linux_111710"
## Then we make a temp folder and download the new plugin
cd /tmp/pluginstall
sudo wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_$version.tar.gz
## Next we extract and place the plugin
sudo tar xvf flashplayer10_$version.tar.gz
sudo mv libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/
echo "Please restart Firefox to enable Flash"
elif [ "$refstr" = "no" ]
then
echo "I am sorry but you have to agree. "
else
echo " I am sorry but you have to agree. "
echo
fi
#!/bin/bash
## First we make the working directory
sudo mkdir -p /tmp/pluginstall &> /dev/null
#choose version of ubuntu
#Input code browser
function strinput {
unset refstr
echo -n "$1"
read refstr
}
## Ask if they agree to file bug reports, sort of a reminder
echo
echo "This script is used to setup 64-bit Adobe Flash 10 Square."
echo ""
echo "By downloading the software listed below, I acknowledge that I have read and agreed to the terms of the Flash Player 'Square' License, the Adobe.com Terms of Use and the Adobe Online Privacy Policy."
echo "See http://labs.adobe.com/technologies/eula/flashplayer10.html"
echo ""
echo " Do you agree? yes or no : "
if [ "$installtype" = "" ]
then
echo -n "(please type the whole word in lower case letters)"
strinput
else
refstr=$installtype
fi
if [ "$refstr" = "yes" ]
then
echo "Flash installing."
## First we uninstall and remove all the existing flash packages
# No longer trying to reply nspluginwrapper since Acrobat Reader 9 requires it
#sudo apt-get -y purge nspluginwrapper
sudo apt-get -y purge mozilla-plugin-gnash
sudo apt-get -y purge swfdec-mozilla
sudo apt-get -y purge flashplugin-nonfree
#sudo rm -rfd /usr/lib/nspluginwrapper
sudo rm -f /usr/lib/firefox-addons/plugins/libflashplayer.so
sudo rm -f /usr/lib/mozilla/plugins/libflashplayer.so
sudo rm -f /usr/lib/mozilla/plugins/flashplugin-alternative.so
sudo rm -f /usr/lib/mozilla/plugins/npwrapper*flash*so
rm -f ~/.mozilla/plugins/*flash*so
## What is current version?
export version="2_p3_64bit_linux_111710"
## Then we make a temp folder and download the new plugin
cd /tmp/pluginstall
sudo wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_$version.tar.gz
## Next we extract and place the plugin
sudo tar xvf flashplayer10_$version.tar.gz
sudo mv libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/
echo "Please restart Firefox to enable Flash"
elif [ "$refstr" = "no" ]
then
echo "I am sorry but you have to agree. "
else
echo " I am sorry but you have to agree. "
echo
fi
Monday, May 2, 2011
Desktop theme keeps changing in maverick
The nautilus theme becomes a basic bland one, and there are noisy pops on pressing every button. To get back,
rm -vr ~/.gconf/apps/nautilus && killall nautilus
This will delete the directory and kill nautilus if successful.
rm -vr ~/.gconf/apps/nautilus && killall nautilus
This will delete the directory and kill nautilus if successful.
Thursday, February 17, 2011
rename subtitle files easily
here's how to rename subtitle files easily, so that they can have the same names as the video files.
for i in `ls *.srt|awk -F . '{print $1}'`;do j=$(printf %02d $i);mv $i.srt "The Office-S06E$j.srt";done
Change the name of the series to the appropriate name
for i in `ls *.srt|awk -F . '{print $1}'`;do j=$(printf %02d $i);mv $i.srt "The Office-S06E$j.srt";done
Change the name of the series to the appropriate name
Subscribe to:
Posts (Atom)