01110100110101010101011101100010
fedora
Get updates of completed torrents via SMS
Apr 6th
This Sunday when i was giving DBUS a look and thinking about all the cool things possible with it, one of my friend came asking how can he control his torrents from anywhere and i thought controlling is ok, do you want SMS updates??, i fired up qdbusviewer and there it was a simple way to get sms notifications of finished torrents using well twitter and ktorrent, so here are the steps
1) setup your cell phone to recieve SMS updates in twitter,
2) get one more twitter account lets say ktorrent, follow ktorrent and turn device updates on,
3) now save the script below say as torrenttwit.py
4) now enter this ktorrent account username and password in the script below,
5) start ktorrent if not already started, now run the script by typing “python torrenttwit.py”
import dbus,base64,urllib2,urllib
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
username="username"
password="password"
def tweet(msg):
request = urllib2.Request('http://twitter.com/statuses/update.json')
request.add_header('Authorization', 'Basic %s' % base64.encodestring('%s:%s' % (username,password))[:-1])
request.add_data(urllib.urlencode({'status': msg.encode('utf-8')}))
opener = urllib2.build_opener()
req= opener.open(request)
s = dbus.SessionBus()
kt = s.get_object("org.ktorrent.ktorrent","/core")
def update(k):
torrent = s.get_object("org.ktorrent.ktorrent","/torrent/"+k)
name = torrent.get_dbus_method("name","org.ktorrent.torrent")
tweet("ktorrent: finished " +name())
kt.connect_to_signal("finished",update)
import gobject
loop = gobject.MainLoop()
loop.run()
you are done, now whenever a torrent finishes the script will twit and you will receive an SMS update
enjoy
JavaFX and Pong
Mar 1st
There was a workshop conducted by engineers form SUN in our college regarding JavaFX, which went quite well. I was planning to start with JavaFX but as there was no Official release of any Linux SDK, it kept me back but this semester i had to install Windows because of my University which wants me to use Visual Studio for my mini project this semester, so as i had Windows (unwillingly) on my system i planned to go and attend this JavaFX workshop.
From what i have learned in these two days, JavaFX looks promising for developing Rich Internet Applications, the language is somewhat a mixture of JavaScript and Java. With Type Inference , Audio/Video support etc making it very easy to use and create applications with.
In the workshop after every thing was over we were asked to make a simple application in JavaFX, so here is my code for a Simple pong game in JavaFX
the resolution is set to 1440×900 you can change it to your resolution in the code
More >
Using Apple Keyboard in Linux (Fedora)
Feb 19th
Few Days Ago i received my Apple Keyboard and i am enjoying typing on it, but having to hold down the Fn key then tap one of the F-keys to get F-keys working was irritating.
a simple solution to get it working just add this to your /etc/rc.local file
echo 2 > /sys/module/hid_apple/parameters/fnmodeand F-keys will start to work properly, enjoy
Update :- update for recent kernels,
HowTo MPD with Pulse audio
Feb 13th
A Little background, i just shifted to mpd from Amarok 2.0 somewhy i dont seem to like Amarok 2 but thats a different story, For those who dont know MPD s a flexible, powerful, server-side application for playing music. which runs as a daemon and has a lot of front ends for it, Sonata being a popular one.
now coming to the point i use Fedora 10 and it has Pulseaudio by default, now the problem is i some time get “NO Read Permission” in Sonata and then mpd would stop working, in mpd.log file i will find “Error opening ALSA device “hw:0,0″: Device or resource busy” error, which means this is an pulseaudio permission issue, to solve it we need to change the mpd.conf (/etc/mpd.conf) to
audio_output {
type "pulse"
name "My Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
}
then we need to add
load-module module-native-protocol-tcp auth-anonymous=1
to /etc/pulse/default.pa which gives everybody permission to use pulseaudio and thats it.
MobiVision, Techtatva 08, LUG Manipal and lots more….
Oct 20th
I am posting to my blog after a long long time and a lot has happened, first Lets start with MobiVision.
MobiVision (Brain child of Subhendra Bhaiya) was a workshop conducted by people from LUG Manipal ( well not officially but everyone involved in it was from LUG Manipal ) as the name suggests it was on developing Application for mobile Plateform, basicly targeting Python for Series 60 and Android, We were expecting turnout of around 100 people and more the double turnout took us by surprise, it saw a partisipation of over 200 which comprised of guys/gals from First to Fourth year which was really amazing we even had people doing PG showing Interest, we had some trouble managing them in 2 rooms which were alloted to us but in the end every thing turned out pretty well. We had 2 Teams ready one for Python S60 and one for Android, Both teams did a great job and made Mobivision the most sucessfull Workshop in Techtatva 08.
Next was Techtatva 08 which is the annual Technical Fest of Manipal Institue of Technology, Manipal, Here again LUG Manipal was in full control ( and again not officially!!! ) we were to conduct events for the Computer / IT Catagory called ” PARAM ” and we planned to change the previously conducted events so as to make them fit in the 4 basic catagories of people –
1) ” MobiVision ” for Inovators here teams where to come up with a inovative Idea for Mobile Application and a prototype
2) ” Jour ” for Developers here teams were to make any one of the three Projects and give a Presentation and Demonstration of their product
3) ” CodeBytes ” for Programers the usual problem solving event with not so usual questions
4) ” Puzzle Mania ” for Every Day internet users comprising of all sorts of Puzzels
all the events saw good participation from all years and were prased for not having a single glitch.
I also made a Deligate and Event Registration system for managing and registering all the people coming for Techtatva 08 and also a CBT ( Computer Based Test ) system for priliminary rounds of some events, it was all basicly made in PHP and used MySQL as primary Database and was hosted on a Fedora 9 ( for those of you who dont know what it is — Its a GNU/Linux Distribution and also my Primary OS ) based server running Apache in Student Councels room because we/I were/was denined permition to host it on the main Manipal University server, they said “You are a Threat for our Network!!!” ??? which left me wonder what kind of stuff they do there and what did i do to them??? ( reason for which i got to know later ) anyways we managed to get a lab computer for using as a server, it had a AMD Athlon x3800 CPU, 80 GB HDD and 1GB RAM, which was all i needed for my work, the PC was formatted and fresh Fedora 9 was installed on it, after this all updates were applied which didn’t took much time as the connection there is not at all like I-ON and is at least 10 times faster ( well it was MAHE LAN and I-ON is WiFi but still!!! ) some changes in http.conf and iptables and it was ready. The System ran without a glitouch except when someone made the LAN cable for the server loose which made all on Registration Desks shouting but luckly everything was back online in 2-3 mins. The CBT’s also ran very good and results were decleared as soon as the alloted time was over and there were no objections.
Well this is enough for a post now 3rd Sessionals are approaching and i need to study as i screwed my 2nd sessionals, so bye
Ankur Shrivastava
Ion Auto Login script in Python
Sep 16th
i was just thinking about making the very famous IAL script of DJ in python and here is it and its damn simple
import urllib, urllib2, time
username = "Your username"
password = "Your Password"
interval = 10
data = {"loginID":username,"loginpassword":password,"flag":"0","popcheck":"0","submit":"Sign In"}
value = urllib.urlencode(data)
request = urllib2.Request("http://192.168.150.2:8080/clntAuth/clntAuth_main.jsp",value)
print "Logging In\nMade by Ankur - http://ankurs.com"
while (1):
open = urllib2.urlopen(request)
responce = open.read()
for i in range (1,interval):
print (interval-i),"min Till Next Login"
time.sleep(60)
print "Logging In\nMade by Ankur - http://ankurs.com"
or downlaod
run it by typing python ial.py
it uses urllib, urllib2 and time which are the default module, you have to change the username and password to your username and password, changing the interval changes the time interval in which auto login takes place. enjoy!!
PS – current it does no check if your connection is active or not, will add that soon
iPhone on Vodafone in India
Aug 20th
The price of 31k for iPhone in India has been confirmed i recieved the following mail
Hello Ankur, Thank you for registering for your Apple iPhone 3GTM with us. We are delighted to announce that the iPhone 3G will be available in India from August 22, 2008
It will be available in 8GB & 16GB models, priced at Rs 31,000 and Rs 36,100 respectively.Be the first to get the iPhone We have received a large number of registrations. As there are limited stocks, make sure that you get yours first, by paying an advance of Rs 10,000 to confirm your booking. Where can you make this advance payment? The iPhone 3G will be available at select Vodafone Stores. All you need to do is drop in at any select Vodafone Store between August 20 and 21 and make the advance payment by cash or credit card. Don´t forget to show the iPhone booking SMS, which you would have received from us, when you visit the Vodafone Store to pay the advance. To find a Vodafone Store near you, click here Get an appointment now. No queues for you. Once you pay the advance, we will immediately give you an appointment date and time, starting
August 22 when you can come and experience a full demonstration and collect your iPhone, all ready to use with your contacts and settings, by paying the balance amount.Hurry! Limited stocks. Remember, the sooner you confirm your booking, the earlier you´ll get your iPhone. We have limited stocks and it will be on first come, first serve basis. Buy a Vodafone connection now! As you are not a Vodafone customer, you will need a Vodafone connection for your iPhone 3G.
We recommend that when you come to confirm your booking, please do get yourself a Vodafone connection too. Remember to carry a passport sized picture, photo ID proof and address proof as these are required for activating your Vodafone SIM card.Happy to help If you have any queries, log on to www.vodafone.in/iphone or call us on 9886098860 and we´ll be happy to help. Hurry and be one of the first to make the iPhone 3G your own. Regards C P Joshi AVP – Customer Service
At a Price of 31k and 36k i dont think there will be a large number of users going for i, here Vodafone seems to India what Rogers was to Canada, anyway one more reason for not going the i way!!!!!
Dell XPS 1530
Jul 12th
Finally after waiting for a long time my Dell XPS 1530 arrived yesterday and it really rockss, i was supposed to get it on 3rd July but continuous delay were caused by curfew in Indore and some other factors.
The Config is
Processor : Intel C2D T8100 - 2.1GHz
RAM : 3GB 667MHz Dual Channel
Graphics Card : GeForce 8600GT 256 MB
Screen : 15.4" WXGA+ ( 1440x900 )
WiFI card : Intel 4965 802.11n
OS : Windows Vista Home Preminum ( removed after an hour )
It looks gr8 far better then what i previously owned, HP 6515b which was given by my college MIT, Manipal.
As soon as i received my Dell first think i did was to run Windows Performance Index and the score came out to be 5.0 with 5.0 being the lowest score because of my 3GB RAM!!!

I tried some Windows Media Centre and then it was time to say vista good bye and say hello to Fedora 9, the install went without a hitch but when i booted i that my mouse was not working, a quick search on forums and i had the solution add i8042.nomux=1 as a kernel parameter and every thing was working, WiFi, LAN all worked out of the box, some yum install and my new notebook was ready to rock and roll

so here they are x144 and x121
PS – i will be heading back to manipal on 16th, waiting for a really rocking sem……….
iPhone3G or Openmoko Freerunner
Jun 29th

We all have been listening ( reading ) a lot about the new iPhone 3G and how it is different, better and well cheaper from the first generation iPhone and a question came to my mind with Airtel and Vodafone planning to launch iPhone what will happen to Openmoko how many people know about it and well its available in India at a price of around RS. 20,000 by IDA system its really a great Phone to own actually Openmoko Freerunner is the second phone which will run Openmoko software and is similar to the first Neo 1973 its specification are
* Processor -- Samsung S3C2442 500MHz
* RAM -- 128MB
* Flash -- 256MB
* Display -- 2.8-inch diagonal 640 x 480 VGA Color TFT LCD
* Graphics -- SMedia 3362-based 3D graphics acceleration
* Accelerometers -- 2 x 3D accelerometers
* Audio -- "high-quality" audio codec
* USB -- 1 x version 1.1, switchable between client and host modes
* Cellular -- 2.5G tri-band GPRS/GSM (900MHz or 850MHz, depending on region)
* WiFi -- 802.11b/g WiFi
* Bluetooth -- version 2.0
* GPS -- AGPS (assisted global positioning system) receiver
Which is really great Freerunner does not have 3G but well in India at present there is no 3G and i dont think it will be there anytime this year as frequency allocation has not taken place add to that only planning is going on which will take a lot of time so remove all the 3G factor from iPhone 3G …….
Another thing Openmoko Freerunner is a complete Open Source Phone you can download the whole source code and change it according to your wish and well about the applications there will be plenty of applications available for it at no cost
So while many of people around me will go for iPhone 3G ( without 3G ) i am going to FREE MY PHONE!!!!!!
Firefox 3 is here!!!!!!!
Jun 18th

So Finally after a delay of about 1.5 hours Firefox 3 is here and the download link is here World Record here we come
PS – No matter how many people download it will anyway be a world record coz its the first time a record of this type is being done











