Sunday, December 1, 2013

Chat Project with SVN

SVN is version control system.   


1. Install SVN on Linux 
$ sudo apt-get install subversion
 

2. Install Apache
$ sudo apt-get install apache
 

3. Now we want to configure apache to run HTTPs.
Following command will enable ssl Apache2 module with a2enmod (cryptic name for “Apache2
enable module”:
$ sudo a2enmod ssl
 

4. Now configure the SSL site. Fortunately we already have the configuration file for that, we just
need to enable it with a2ensite (cryptic name for “apache2 enable site”)
$ sudo a2ensite default-ssl


5. As we made several changes I prefer to restart apache with
following command:
$ sudo /etc/init.d/apache2 restart


6. First of all, we need to install the Subversion modules for Apache2.
$ sudo apt-get install libapache2-svn
They will be enabled by default. So you don’t need to run a2enmod.
We only need to configure a repository. Let say our project is called ‘myproject’.


7. First of all, let’s decide where our svn repositories will be created. I like /var/local/svn
$ sudo mkdir /var/local/svn/


8. Then let’s create the repository using following procedure:
$ sudo mkdir /var/local/svn/myproject
$ sudo chown www-data:www-data /var/local/svn/myproject
$ sudo -u www-data svnadmin --config-dir /etc/subversion create /var/local/svn/myproject
Above commands will ensure that the user www-data (which is the apache user) can fully access
the repository for reading and updating it.


9. edit /etc/apache2/mods-available/dav_svn.conf
using:
$ sudo gedit /etc/apache2/mods-available/dav_svn.conf
And add a section like the following one:
<Location /svn/myproject>
DAV svn
SVNPath /var/local/svn/myproject
AuthType Basic
AuthName “My Project Subversion Repository”
AuthUserFile /etc/subversion/myproject.passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
In the above file we indicated that, at the location svn our repository should respond. And for
updating the repository we want a valid user. As per above configuration anonymous consultation
is allowed; but you can disable it commenting with a leading ‘#’ the lines <LimitExcept ... and
</LimitExcept> or just removing them as in following example:
<Location /svn/myproject>
DAV svn
SVNPath /var/local/svn/myproject
AuthType Basic
AuthName “My Project Subversion Repository”
AuthUserFile /etc/subversion/myproject.passwd
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>
</Location>



10. valid users need a password, and in fact we indicated a password file for our repository
called /etc/subversion/myproject.passwd. So let’s create a password file with a couple of users:
$ sudo htpasswd -c /etc/subversion/myproject.passwd foss
$ sudo htpasswd /etc/subversion/myproject.passwd trupti
The -c option indicates that the password file should be created as new; and it is only necessary for the first user. Be aware of the fact that -c overwrites the existing password file without asking
anything. 


11. Let’s reload apache configuration to make the changes effective:
$ sudo /etc/init.d/apache2 reload


12. And let’s test with the browser that our svn repository is now accessible through HTTP and HTTPs
at following urls:
http://localhost/svn/myproject/
https://localhost/svn/myproject/
Now we can download our project using svn under my home/Subversion
root@trupti-HP-630-Notebook-PC:~/subversion# svn co https://localhost/svn/myproject
Checked out revision 0.
The first time it will prompt for accepting the SSL certificate, answer to accept it permanently (p).
Then it will optionally ask you for the password, type it.
Since its a new project that i am starting so there is no file in my repositories. The word Check out
revision 0 says how many time the code is committed.
Now i am creating a new file in my local working copy
root@trupti-HP-630-Notebook-PC:~/subversion/myproject#vi sample.php
Hi this is sample testing
Now i had saved the file
svn add filename” will add the files into SVN repository.
root@trupti-HP-630-Notebook-PC:~/subversionmyproject# svn add sample.php
A
sample.php


13. Commit the added file to Repository
Until you commit, the added file will not be available in the repository.
root@trupti-HP-630-Notebook-PC:~/subversion/myproject# svn commit -m "new file added
sample.php" sample.php
Adding
sample.php
Transmitting file data .
Committed revision 1.
Now we have added the file sample.php to our repository. Now we will delete our local copy and
freshly we can download the project from the repository and make whatever changes we want.


This is how we set up the SVN Repository and Work with it.

* Now we shall use svn on a public code repository https://code.google.com/ .
* Create a demo project with a text file chat.txt
* Add content in the file example "trupti:hi"
* Tell your friend to run the command (top one) for checkout in source tab
* It will check out the project in his machine.
* Make some changes to that file example "ayesha:hows u?"
* Then do an svn commit
* When it asks for username, add the gmail id and for password go to profile->settings in the link.
Normal repo is just local to us.
Only difference to local thing and this is that our central repo is now on google code.
HAVE FUN....

Thursday, September 12, 2013

PyCon India Bengaluru

"Be cordial in open source or be on your way"
"Code solves problems created by humans"
                                          
29th August 2013, the day of Dahi Hundi festival, just came back home from Dombivli where my play(theatre) friends, Digambar Acharya and others have their rehearsals. The trip wasn't planned at all. I called my uncle and told him about the event and the location. Without a second thought he told me to book the flight tickets and forget the worries of accommodation.
I was new to Bangalore and it was my very first outing all over alone. The decision was taken in such a haste that I couldn't apprise my friends too.
It was 9pm and that time my colony guys were forming human pyramids to break 2nd Dahi Handi. It was a great time watching all pals playing music, dancing, eating, & forming human pyramids.
Vidhana Soudha
30th Aug: Next day morning, I went to office. Taking half day leave after lunch, I had my flight @4.20pm to Behngaluru. As it was cutie Yashu's(at who's place I was going to stay in Bengaluru) birthday, I got chocolate tin pack for her.
As usual Air India flight got delayed by 1 hour.

At Bengaluru, Yashu, and her parents had come to receive me. It was after 10 years I was meeting them.  They actually belonged to Hebal, Bengaluru. Reaching their place, I met another cutie, Sonu(their pet dog).

After rejuvenating ourselves, we went to meet Yashu's cousin Mangala and her family.

31st Aug: Second day of Pycon but first day of actual conference @NIMHANS, Hosur. On 31st and 1st there were conferences while on 30th there were workshops.
There are pycon in various countries. In India it happens at Bengaluru. Very well organised with proper mailing list. With one registration you can enjoy talks, free wifi, breakfast, lunch, snacks, goodies & t-shirts.  There were 3 auditoriums at NIMHANS with talks going in all 3 simultaneously as per schedule. view http://in.pycon.org/2013/

Schedule(talks in brief):
"Nanu Bengalurige Pycon attend maadalu bandiddini" was taught to me by one of my Pycon attendee. 

* Keynote talk by Kiran Jonnalagadda
Paradox:The more the less is the code, the more good is the code. Then what if no code at all?
Bootstrap developer : Twitter
Flask : everything in api and no need of doc and lightweight
Denied : the next generation python micro-web-framework

* First talk by Shrinivasan : zeromq in which client creates a socket and assumes there will be a server. Any order client first then server http://zero.mq

* plivo : graph by Kunal Kerkar
carbon : daemon
whisper : db

* Chetan Giridhar-real time communicationautomated chat

* Panel discussion: Prabhu Ramachandran, FOSSEE, IIT Bombay one of the panel member:
Q.Should there be python for non-engineers?
Panel: Depends on the need
Example of spoken tutorial which is e-learning of FOSS.
It is always important to learn simple language like python.
If not then go and learn machine language.
Teachers are only teachers not learners & python cannot change their attitude.

That evening after conference, we went to Mantri Mall where we entertained ourselves at amoeba, scary house and finally dinner at Rajdhani (36 items thali) Hotel. On the way I saw Vidhana Soudha, Lalbagh botanical garden, Kalashetra, UB city, Chinnaswami stadium & golf area in Bengaluru. I heard songs like "Krishna Ni Begane Baro" which was playing in the car on the way.

I heard Kannada version of "Kadhi tu" Marathi song from the remaked kannada movie of Mumbai-Pune-Mumbai.


1st sept:
* ulrlib2 kenneth(heroku)

* Sudar Muthu @sudarmuthu (Rasberry pi) github.com/sudar
1. Need voltage regulator
2. Combination of arduino and rasberry pi is best
3. Usage of LED in hardware is like "Hello World" program in software. 
4. Require to install python-dev

5. 3.3v max 1.7v resistance
6.Create file connect led to rpi and then run
sudo ./filename.py

Various projects with python and Rasberry pi(pi stands for python)
1. Brightness program
2. Button on off program
3. pycam : face recognition

Miscellaneous Facts discussed in PyCon:
* Difference between Raspi and Beaglebone
* What is Spider trap?
* Python + staf is used to run test case
* Use of Decorator tool-to know on which module to execute
* What is fabric module?
* What is foo bar?
For details you can watch videos on twitter.
There were also openspaces conferences. In openspaces there  were talks, seminars & contests.


That evening we went to Maiya's restaurant and shop. I bought appe midi and puliyodhara. We had Karnataki delicacy there.

2nd sept: Flight @10.20am back to Mumbai. In flight I met a GSB girl Sheetal Bhat, who works in Cleartrip. From a stranger to a good friend in one hour.
Bengaluru can be portrayed as a city with a beautiful weather. I am really missing Yashu, Mangala and everyone there. I really owe them for the care and affection they gave like my family in those three days.

Saturday, September 7, 2013

CryptoParty Mumbai





What is CryptoParty?
CryptoParty (Crypto-Party) is a grassroots global endeavour to introduce the basics of practical cryptography.A CryptoParty is a hands-on training program  where we introduce Internet users to the tools that help in protecting privacy in the online world. The training program will teach the ways in which communications and data can be encoded to prevent disclosure of their contents through eavesdropping or message interception, using codes (2), ciphers (3), and other methods, so that only certain people can see the real message.

It was my first CryptoParty. I was introduced to such a party by my buddy, Parin who had already attended it in Delhi this year. This week I read a mail on ilug-bom mailing list that they are organising in Mumbai at VJTI college on 7th Sept 10am-1pm.

I considered it a very good opportunity to meet and interact with open source enthusiasts and privacy concerned maniacs. I registered online for the party the day before. On 7th morning, the party was organised at CS lab of VJTI.
Disappointing part: 
1. Less participants as many people are unaware of such events. 
2. VJTI CS lab doesnt have Linux in all its machines.
3. There was no wifi availability for grand workshops nor there was freedom to use proxy network in the lab.
4. No proper organisation of the event although the event had good quality presentation. 

Gradually by 11am, there was atleast respectable number of participants for the party. 
The response from all the participants was great. I met a freelancer technology journalist Ms. Rohini with whom I could interact after the event too.
The volunteer who organised this event was Nikita Belavate from wikipedia-mum and Free Software Movement Maharashtra (FSMM).
The presentation was conducted by Surendran Sir surendran.info/.
Free Software Movement Maharashtra (FSMM) in association with Software Freedom Law Centre (SFLC) had organised the cryptoparty.
 

Agenda:
Introduction
Browsing Security

TOR
Browser security
Password Management

Email and IM Security

Web based email
Email clients (thunderbird)
Mail encryption
 

The contents in brief were as follows:
* Google: The Godfather who gives away your data to the advertisements. So next time if you get bugged by ads which already has your name on it, you know the culprit.

* Collusion is an addon by which you can visualize who's tracking you in real time.

* If you think you are safe and not getting tracked, take an example of my friend who was searching for a 4 slot toaster which actually comes in 2 slot in Amazon.com. He failed to get it.
Next week he got a mail from some other e-commerce site which recommended him few toasters.Do you still feel you are safe? Did'nt you experience such thing? Or you trying to be oblivious as the usage of such sites is inevitable? If its inevitable atleast you can prevent them from tracking you. Every individual is concerned about his/her privacy policy. You are booking a flight for a vacation on a site say makemytrip.com. Google, makemytrip, bank  etc. already know you are going on a vacation. When you are concerned about who encroaches your house then how can you allow someone encroach your profiles and access your data. No thing is 100% secure on internet but we atleast can do our best to be safer although can't be safest. Such encroachment is nothing but data mining.
Humor : Target corporation, a supermarket in US already knew a woman was pregnant before she declared. That supermarket tracked the products she purchased and calculated the months and date.
Did you know Twitter firehose sells tweets to advertisements?
Metadata is nothing but some sites can access your data after data by accessing just your email id.

* Best OS is TAILS https://tails.boum.org/.

* Best browser TOR.

* openpgp for encrypting your mails in thunderbird.

* Install add on https finder/everywhere for secured search.

* Use browser extension DoNotTrackMe.

* Use passwrd manager keypass.

* In chrome, if you save passwords, then in settings you will get list of passwords you have saved for sites and any one who will get access to your system can view the passwords. SO NEVER SAVE and use lastpass password manager.

* VPN : Another secured internet access.

Sunday, May 19, 2013

Debian Project News 10th issue


Thanks to Parin Sharma, organizer of the successful Debian Release Party for our course, MSc FOSS. Here is the link http://www.debian.org/News/weekly/2013/10/#wheezy for the Debian Project News 10th issue where there is a special mention of our release party in India. TOAST TO MSCFOSS!


Follow Us:
Praveen A
Parin Sharma
Trupti Rajesh Kini



 

Monday, May 6, 2013


India: MScFOSS Guest Lecture


  • When: 05.05.2013 during 1800-1900 HRS IST
  • Where: MScFOSS Guest Lecture
  • What: A virtual party in our guest lecture ( basically using BigBlueButton )
  • Provided: A real cake would be there( but you have to come to Delhi to have it :) ) and also some whistles/drums/instruments, with people in different locations....
  • Bring: A headphone with mic, webcam, and flash plugin, just try it out on http://demo.bigbluebutton.org
  • More info: If any Debian Contributor/Supporter wants to speak at this event, please let me know, mail me on parinDOTsharmaATgmailDOTcom, (and login details will be mailed to your id, please do it at least a day before party) 




    It was a Fantastic party organized by my course mate Parin Sharma on 5th May 2013.
    The party started with Cake cutting ceremony by Parin from Delhi(envy him :p). We had this virtual party through BigBlueButton which has audio video sharing capacity where our usual course lectures take place. For more info on our course visit http://cde.annauniv.edu/mscfoss/Background.html.
    Later we had Guest lecture by Praveen A.
    Praveen is involved in the Debian-IN project on Alioth, aimed at
    the maintainance of packages related to support of languages of
    India. 
    You can find him active on diaspora.
    It was a great day and never knew even a virtual party could be so much fun.
     
     

Mesmerizing Fortnight

This time its Sangli,Satara & Kolhapur. We hate to spend our daytime in journey so we prefer night journey. Unfortunately trains f...