Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • Kartik 8:40 AM on February 12, 2012 Permalink | Reply
    Tags: , , , , , , , , , , ,   

    Control All Computers in a Lab from a Single System 

    Quoting Dhandeep, our super-cool lab-admin:

    now , all 70 systems in the lab can be switched on and switched off by single commands from the hostel…

    Yes, that and a lot more is possible in our Software Systems Lab now. How? Read on…

    The Setup

    We have over 70 systems with Ubuntu 10.04 LTS installed on them. There is an administrative account (let’s call it admin for this post) and a guest (limited privilege) account on each. Needless to say, admin password is known only to admins and guest password is known to all who use the lab. All these systems are configured to be able to controlled remotely (read: OpenSSH server is installed on each).

    Basic Idea

    1. Log in via SSH without a password
    2. Write your desired command and run it in background
    3. Run the above in a loop for the lab’s subnet.

    Detailed Steps

    See Tips for Remote Unix Work (SSH, screen, and VNC) for the first step (and for more immensely useful tips on remote usage of *NIX systems).

    For Step 2, here is one example command:

    ssh -t admin@labsystem "echo  | sudo -S shutdown -h now" &

    In the above command labsystem is usually replaced with an IP address like 192.168.xxx.xxx and the <pass> with the password of the admin account.

    WARNING: it’s not suggested to use the above command out in the open to save the password from prying eyes; also note that for additional security, you need to take a measure to make sure this is not saved in bash history or if the command is in a script, it’s not accessible to others.

    The requirement of ampersand at the end depends on particular usage (if you want to run, let’s say,  uptime command over ssh, you would not want the output to go to background, or you can redirect the output to some file). Putting the process in background, in this case, will help in the next step.

    The -S switch for sudo makes it possible to supply the password via stdin (we had discovered this switch from sudo’s man page, but didn’t manage to conclude “echo pass |” will do the trick until we discovered it at StackOverflow)

    Step 3: use your favorite scripting language (bash, python, etc.) and run the above command for all the systems of your lab subnet. An example in bash:

    for ip in {101..180}
    do
    	ssh -t admin@192.168.xxx.$ip "echo  | sudo -S shutdown -h now" &
    done
    

    The above code snippet will run the desired command for all systems in subnet within the IP range 192.168.xxx.101 to 192.168.xxx.180. Now, you can clearly see how putting the process in the background will help – the next iteration of the loop need not wait for the command in previous iteration to finish!

    In the passing, here’s a small video I shot featuring Dhandeep when he got all excited to see this working:

    That’s it. Try this out, share your tricks and have some *NIX fun in your lab. :-)

    PS: I have not covered how systems can be switched on with this setup. It basically involves broadcasting a magic packet to the subnet. Hope Dhandeep comes up with a blog post on that soon. ;-)  Here it is: On the push of a button..

    Ciao

    Kartik

     
    • firesofmay 8:53 AM on February 12, 2012 Permalink | Reply

      Sweet! I love it! ;)

    • Amarnath 8:54 AM on February 12, 2012 Permalink | Reply

      Interesting. But, I think you forgot to mention the important prerequisite for doing this task. Don’t you need to generate public keys for all machines to be controlled and pass it to the central control node? I believe only this would help in password-less remote login via SSH.

      Indeed Dhandeep seems to be pretty excited about it. :-)

      Cheers

      Amarnath

      • Kartik 10:03 AM on February 12, 2012 Permalink | Reply

        Thanks for your comment Amarnath.

        Indeed, that is necessary and is mentioned as the first step. But instead of describing the whole process myself I chose to point to a good resource (Tips for Remote UNIX Work…) for that kind of setup. You missed out perhaps. ;-)

    • Lokesh Walase 5:41 PM on February 12, 2012 Permalink | Reply

      Awesome !! :)

    • Imran 11:04 PM on February 13, 2012 Permalink | Reply

      You can use puppet to design more efficient system which gives you more flexibility in automation

      • Kartik 12:56 AM on February 14, 2012 Permalink | Reply

        Yeah, that’s right. I have that in my to do list to learn soon. :-) Though, I am not aware if it works for normal desktop systems too.

  • Kartik 12:03 PM on January 26, 2012 Permalink | Reply
    Tags: , , rationality   

    Intension and Extension

    To give an “intensional definition” is to define a word or phrase in terms of other words, as a dictionary does. To give an “extensional definition” is to point to examples, as adults do when teaching children. The preceding sentence gives an intensional definition of “extensional definition”, which makes it an extensional example of “intensional definition”.

    Source: http://lesswrong.com/lw/nh/extensions_and_intensions/
     
  • Kartik 2:06 PM on October 13, 2011 Permalink | Reply
    Tags: C, , Operating system, , UNIX   

    UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.

    Dennis Ritchie. Source: http://www.linfo.org/q_unix.html See also Ashik’s post about his death – http://aashiks.in/blog/?p=270
     
  • Kartik 12:49 PM on October 6, 2011 Permalink | Reply
    Tags: , Git, , Linux distribution, Source code   

    Build EiskaltDC++ on Fedora 15 Lovelock 64-bit 

    EiskaltDC++ is a cross-platform program that uses the Direct Connect and ADC protocol. The direct connect client LinuxDC++ available in rpmfusion repos doesn’t yet support ADC protocol and hence doesn’t work with the DC++ Hub that has been setup in our hostel. I had to compile Eiskalt from the sources. Posting here the steps I had to follow for a rather painful build.

    I am using Fedora 15 64-bit with GNOME 3 desktop.

    First install the dependency packages, I had to install all these devel packages for my system, YMMY, see below:

    sudo yum install cmake bzip2-devel xlib-devel zlib-devel openssl-devel qt-devel qmake boost-devel libupnp-devel aspell-devel libidn-devel lua-devel
    

    cd to a desired directory where you keep your sources. Then,

    git clone git://github.com/negativ/eiskaltdcpp.git #Clone the latest source from the official git repo
    cd eiskaltdcpp/
    gedit INSTALL & #Keep the INSTALL file handy, it lists all the dependencies required for the build
    mkdir builddir
    cd builddir/
    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DUSE_QT=ON -DUSE_ASPELL=ON -DFREE_SPACE_BAR_C=ON&nbsp; -DCREATE_MO=ON -DLUA_SCRIPT=ON -DWITH_SOUNDS=ON -DWITH_LUASCRIPTS=ON -DUSE_MINIUPNP=ON -DLOCAL_MINIUPNP=ON ../
    

    If you get an error in the above step, check which dependency is missing and install it using yum

    make -j9 #replace 9 with the number of cores in your CPU plus one. For my Core i7 CPU with 8 cores, it's 9
    sudo make install
    

    You can try running it by typing eiskaltdcpp-qt on the terminal. If it gives an error about libeiskaltdcpp.so.2.2 missing, just execute the following command:

    sudo cp /usr/lib/libeiskaltdcpp.so.2.2 /usr/lib64/ -v
    

    Now you can run Eiskalt without any problems. :)

     
    • anonimous 10:14 PM on October 6, 2011 Permalink | Reply

      >libupnp-devel

      you made a mistake – you need miniupnpc-devel, but not libupnp-devel, it’s two different UPnP libraries.

      • Kartik 11:16 PM on October 6, 2011 Permalink | Reply

        I didn’t need to install miniupnpc-devel at all and Eiskalt worked. Perhaps libupnp-devel was also not required, read it is required in one of the forums.

    • anonimous 1:50 AM on October 7, 2011 Permalink | Reply

      you didn’t need to install miniupnpc-devel only because you use this cmake flag:
      -DLOCAL_MINIUPNP=ON

      if you use the -DLOCAL_MINIUPNP=OFF then miniupnpc-devel is needed.

      • Kartik 10:59 AM on October 7, 2011 Permalink | Reply

        Then it’s not required, and what I wrote not incorrect either. Isn’t it? :-)

        • anonimous 12:42 AM on October 8, 2011 Permalink

          DUSE_MINIUPNP – this is cmake flag for enable support UPnP.
          DLOCAL_MINIUPNP – this is cmake flag for use LOCAL COPY miniupnpc from eiskaltdcpp.tar.bz2 archiv sources.

        • Kartik 12:52 AM on October 8, 2011 Permalink

          Oh, didn’t know that. Thanks for clarifying. :-)

  • Kartik 6:13 PM on October 4, 2011 Permalink | Reply
    Tags: , , open source, , software engineering   

    …even if you wrote 100% of the code, and even if you are the best programmer in the world and will never need any help with the project at all, the thing that really matters is the users of the code. The code itself is unimportant; the project is only as useful as people actually find it.

    Linus Torvalds, on Software Development Management. Source: http://h30565.www3.hp.com/t5/Feature-Articles/Linus-Torvalds-s-Lessons-on-Software-Development-Management/ba-p/440
     
  • Kartik 12:00 AM on August 19, 2011 Permalink | Reply
    Tags: Apache, , , Hosting, , , , ,   

    Configuring Apache for Developing Multiple Websites under Ubuntu Linux 

    Are you a beginner in web development with LAMP environment, or a CS/IT student overwhelmed with setting up LAMP and configuring it for your web-related academic project? If yes, then you are at the right place.

    We have discussed earlier how easy it is to setup a web development environment on your Ubuntu desktop. In this article we will try to have a more customized setup of this environment for easily working with multiple websites. Also find below introduction to some useful Apache utilities and configuration files on Ubuntu/Debian operating system.

    One of the ways to work on multiple sites is to put different directories under /var/www and access them as http://localhost/site1, http://localhost/site2 etc. but there is another and more elegant way. We can access our sites simply by pointing our browsers to http://site1/ and http://site2 etc. To find out how, follow the tutorial.

    Let’s keep all our development websites under the home directory in public_html folder. Apart from being easy to manage your website from inside your home folder, this has the benefit that you no longer need to use sudo to put files in your document root (/var/www earlier).

    Open the Terminal and follow the steps for a test setup, you may customize it your preferences later:

    kartik@PlatiniumLight ~ $ mkdir public_html
    kartik@PlatiniumLight ~ $ cd public_html/
    kartik@PlatiniumLight ~/public_html $ mkdir site1
    kartik@PlatiniumLight ~/public_html $ mkdir site2
    kartik@PlatiniumLight ~/public_html $ 

    Create files called index.html with some content inside each of these directories to help you identify them when you walk through this tutorial:

    kartik@PlatiniumLight ~/public_html $ cd site1
    kartik@PlatiniumLight ~/public_html/site1 $ gedit index.html

    Screenshot - index.html (~/public_html/site1) - gedit

    Screenshot - index.html (~/public_html/site1) - gedit

    Enter some text such as “This is site 1″ and save the file. Similarly put “This is site 2″ in the index.html of site2 directory.

    kartik@PlatiniumLight ~/public_html/site1 $ cd ../site2
    kartik@PlatiniumLight ~/public_html/site2 $ gedit index.html

    Screenshot - index.html (~/public_html/site2) - gedit

    Screenshot - index.html (~/public_html/site2) - gedit

    Now begins the main step of the process. We have to create separate apache configuration file for each of the websites. This is fairly easy to do. We copy the default config file and modify it to our needs:

    kartik@PlatiniumLight ~/public_html/site2 $ cd /etc/apache2/sites-available/
    kartik@PlatiniumLight /etc/apache2/sites-available $ sudo cp default site1
    kartik@PlatiniumLight /etc/apache2/sites-available $ sudo cp default site2
    kartik@PlatiniumLight /etc/apache2/sites-available $ sudo vim site1

    Note that I am using vim editor for making the changes as I prefer it for its amazing syntax highlight support even for various linux configuration files, you may use gedit, or any other editor instead.

    We need to change the path of the DocumentRoot and Directory to the particular website’s directory, and add a ServerName directive:

    ServerName site1
    DocumentRoot /home/kartik/public_html/site1
    <Directory /home/kartik/public_html/site1/>

    Take notice of the ‘/’ near the end of the second line, it is important. Also don’t forget to add the line with ServerName directive just before the DocumentRoot directive. The lines which need to be edited are highlighted with red arrows in the following screenshot:

    Screenshot - Terminal - Editing site1 config file

    Screenshot - Terminal - Editing site1 config file

    Save the file, similar changes need to be done for other sites also, site2 in this example.

    Now we need to make entries in the hosts file so that Apache can recognize the new sites.

     kartik@PlatiniumLight ~ $ sudo gedit /etc/hosts

    Add the names of the new sites after localhost as shown:

    Screenshot - hosts (/etc) - gedit

    Screenshot - hosts (/etc) - gedit

    Now enable the new websites by using a2ensite command:

    kartik@PlatiniumLight ~ $ sudo a2ensite site1
    Enabling site site1.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    kartik@PlatiniumLight ~ $ 

    Do similarly for site2, and then run the following command to activate the new configuration:

    kartik@PlatiniumLight ~ $ sudo service apache2 reload
    * Reloading web server config apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]
    kartik@PlatiniumLight ~ $ 

    You can ignore the warning which is shown in the above output. Now open your favorite browser and open http://site1 and http://site2 in different tabs, you will find the content of their respective index.html files.

    Screenshot - Chromium showing both the sites

    Screenshot - Chromium showing both the sites

    And now you are done with setting up multiple sites in Apache. You can create as many sites as desired by following the same procedure, creating a config file for each website.

    Here follows an introduction to some useful Apache utilities and configuration files which aid you in this kind of a setup:

    a2ensite – As we used this above, you already know what it does – enable a website among those available under /etc/apache2/sites-available directory.

    a2dissite – does exactly the opposite – disable a website so that it is no longer accessible from your web server. E.g.

    kartik@PlatiniumLight ~ $ sudo a2dissite site2
    [sudo] password for kartik:
    Site site2 disabled.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    kartik@PlatiniumLight ~ $ sudo service apache2 reload
    * Reloading web server config apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]
    kartik@PlatiniumLight ~ $ 

    This will disable site2 from loading any more. You can use a2ensite to enable it again.

    Similar to sites, there are corresponding directories and commands for controlling apache modules also. Available modules are kept under /etc/apache2/mods-available directory and enabled ones are symlinked under mods-enabled directory. The corresponding commands are – a2enmod and a2dismod. E.g.

    kartik@PlatiniumLight /etc/apache2/conf.d $ sudo a2enmod rewrite
    Enabling module rewrite.
    Run '/etc/init.d/apache2 restart' to activate new configuration!
    kartik@PlatiniumLight /etc/apache2/conf.d $ sudo service apache2 reload
    * Reloading web server config apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [ OK ]
    kartik@PlatiniumLight /etc/apache2/conf.d $ 

    This will enable Apache rewrite module which is required my some CMS solutions like Drupal to enable pretty URLs.

    Hope this article was useful to you, feel free to ask your doubts, problems you face, or any similar tips you might have through comments.

    An edited version of this article first appeared at http://www.muktware.com/articles/1876

     
    • Ershad K 10:30 PM on August 19, 2011 Permalink | Reply

      Informative post, nicely written :)

    • Abhimanyu M A 11:34 AM on August 22, 2011 Permalink | Reply

      Hey think last time i tried it in Hostel LAN i was able to perform a MiM attack, people trying out http://site1/ got to my site if it resulted in no actual site being there , and [not sure about this] even when the other site took a bit long to respond

      • dhandeep 10:07 PM on August 22, 2011 Permalink | Reply

        exactly.. u need to work a lot for setting up the backend to fake sites and get the whole control of the lan data… :) ;) .. well u can even setup a plugin that rediercts to actual site if that site is not on ur comp.. (this ll eliminate the chance of ppl suspecting u.)

      • Kartik 10:28 PM on August 22, 2011 Permalink | Reply

        It might have been a problem of incorrectly configured DNS entries in the hosts file. Please elaborate your scenario more, I am unable to understand the situation clearly.

  • Kartik 6:20 PM on July 15, 2011 Permalink | Reply
    Tags: Anna Hazare, Bribery, , , India, United States   

    Of Corruption, India, and My First Bribe 

    It was this Monday when I visited Rath mam with my friend Arvis. Rath mam had just returned from US after visiting both her children who are well settled in US working in IT companies. Somehow that day our discussion went on to what me and Arvis plan to do in the future after college. Mam was telling us why we should think about moving outside India for higher studies. She stated three important reasons why India is not yet the best place to lead life for those with some moral support system:

    • Corruption
    • Population explosion
    • Typical Indian mentality

    The third reason was not much comprehensible to me, and the second is pretty obvious. What caught my attention was the first one – corruption. She was mentioning how one can try to keep up with their values, but the system just won’t let that happen and someday one just has to break. She also warned us not to regret ever in life over the decisions we take now, and advised to be aware enough of the opportunities that lie ahead in the remaining 2 years of our undergraduate life and to take the full advantages of them.

    I have been inspired a lot by one of my seniors who has been offered fully funded PhD from 2 US universities and is leaving for the US soon leaving a major job offer from Amazon India. I have never given a serious thought to moving out of India but that discussion with Rath mam gave me a new insight to think over things. Also, perhaps it was just co-incidence just a day before meeting mam I tweeted:

    Agreed Neither does punctuality, honesty or integrity RT @rahulp_nair Being sincere in life doesn’t do good in this “ill” society of ours’!!

    And it was yesterday, in the morning, I was thinking about what happened of application for passport which I submitted last March in college (even this application got submitted only because there was this passport camp in college during the time, otherwise I might not have applied myself). I had heard about the difficulties in obtaining the passport from relatives and friends and how one has to bribe the policemen and officers involved to get it done. Anyhow, it was another co-incidence, that the same day my friend Mukul informed me that he got a call for my passport verification and I was informed through a call that I need to submit a few documents at Women’s Police Station, near Lohiya Nagar.

    In the evening, I visited my friend Agam who lives in Lohiya Nagar and asked him to accompany me to the Police Station. We met the person (a man in his 50′s, sitting outside the passport verification room in open air) whom I had talked with in the morning, and submitted the documents with a little informal chat. He had a copy of my application along with that of another NITC friend of mine who also lives in Ghaziabad. There was a little silence while he was keeping the documents and I was feeling a little nervous before asking to leave. Just then he asked for a bribe. I had only 140 bucks with me, and tried to give 40 to him (I had heard that 20-30 bucks was what policemen in our hostel were taking during the verification), he immediately snapped, “ye kya de rahe ho, isme to bas prasad aayega” (what are you trying to give, one can buy only prasad with this much money). I was taken aback and tried to give him the only other note I had, that of 100 bucks, on which he laughed a little said, “isme kya hoga, chalo jao yahaan se” (what will I do with this much, just get lost). I said, “isse zyada to hain nahi mere paas” (I don’t have more than this) and was a little relieved believing that he was OK with not taking bribe from me  as I didn’t have enough. We started to leave, and the person, who had occupied his chair by now, called out to us from behind, “bataye de raha hoon, kaam nahi hoga tumhara, kam se kam 500 rupaye lagenge” (I am telling you guys, your work will not be done, at least 500 rupees are required). I was shocked to hear this – how openly could he demand for bribe like this?

    Bribe

    Image via Wikipedia

    Anyway we left the area for the time, and discussed a little in the parking area. I borrowed 200 bucks from Agam, he kept another note of 500 hidden and we set out again thinking about trying to settle the matter with 300 bucks. On the way Agam kept telling me how it was impossible to get the verification done without bribing this guy, he may just send a false report canceling the whole application in the process, and how even if I apply again (costing me above 1000 bucks), my application may end up with this same person, who will still not to do it until bribed. He also had to bribe this same person for his passport verification a few months earlier. To my relief, the person agreed with 300 bucks after blabbering a little. On asking how much time it will take, he said many more steps are there and somebody will visit my house too later (and ask for bribe again – read below).

    On reading the above two incidents, I ask you – what choice do we (common, law-abiding citizens of our great country) have in situations like these? What Anna Hazare and team are trying to set up – Jan Lokpal – will that work to change the state of affairs even at this grass-root level? Staying here, either you forget about your morals/values or whatever conscience you have and become a part of the system, or end up nowhere fighting the system. Is the only way out is to leave this country because it will never change (not anytime soon anyway) hoping for a better future in foreign lands?

    UPDATE (2011-07-26):

    Got info from my father that some policeman visited my house for verification and again took a 1000 bucks (500 for himself another 500 for somebody he has to pass on the application to) this time promising that he will get the job done without hassles like the need to visit some police station. Listening to him, I had to wonder why it is not such a bad idea to legalize bribery (as I mention in response to Amarnath’s comment below), if the bribe takers can really get the job done fast.

     
    • Maxin B. John 7:10 PM on July 15, 2011 Permalink | Reply

      Kartik ,

      I guess you are lucky. Most of my friends, who applied for passport in Bangalore had to pay at least Rs. 1500. Another funny fact. Most of the traffic policemen in Bangalore will be standing near to ATMs. If you don’t have enough money to pay bribes, they will show the way to the nearest ATM with a command : “Chal, leke aa”.. Just go and get the money which is rightfully mine :)

      • Kartik 10:15 PM on July 15, 2011 Permalink | Reply

        Yeah, I was lucky to have the passport camp being organized in our campus itself, eliminating the first possibility of paying bribe.

        And the ATM thing is really quite funny. :-D

    • Ashik 7:11 PM on July 15, 2011 Permalink | Reply

      What you should have done is gone back home and filed an RTI asking what was the delay and who was delaying it. Our nation has the proper legislations we have to use them that’s all. Anna Hazar and team are setting up a sham – who will watch those watchmen ?

      • Kartik 10:31 PM on July 15, 2011 Permalink | Reply

        The delay was understandable as the passport camp received about 1000 applications, and I was one of the last ones to get through. Additionally I could enquire once I reached back college. The main point is could I complain about that person and get through the verification process without hassles?

        And AFAIK, Jan Lokpal has a procedure for watching the watchmen also (surely longer than other bureaucrats).

    • Amarnath 8:45 AM on July 16, 2011 Permalink | Reply

      Kartik,

      For my passport verification, I had to pay the guy who came to college 50 bucks. Seems like he has to put in some amount for taking xerox and stuff like that and he will get it reimbursed later after he send the verification report. As, he has to do around 2000-3000 verification in a period of 2 weeks, it is true that the guy can not afford to put in money from his pocket for the xerox etc. I think, he made his point clear why he is asking for 50 bucks.

      And thankfully, the constable who came at home to take my address verification was a decent guy and said that he won’t take anything from students like us who study in well off national institutes. It was just because of my father telling him that I study in REC (NITC) he did not ask for money. He frankly said that normally he takes around 100 for verification.
      Corruption is just like a disease. It is upto one to decide whether to fall pray of it.

      • Kartik 3:51 PM on July 16, 2011 Permalink | Reply

        Thanks Amarnath for reminding me the reason they mentioned for asking for money in the hostel.

        The constable must have been good surely to not take bribe in few cases, but does that mean bribing should be made legal?

        I don’t agree with you that one can decide not to fall prey to it, not for those who are openly asked to give the bribe.

    • Joel Elias 11:58 AM on July 16, 2011 Permalink | Reply

      Why don’t you inform tehelka or some group like that? they will atleast try to show this in the open.

      • Kartik 3:42 PM on July 16, 2011 Permalink | Reply

        Incidents like this are so common in our country, making an issue of this will do no good. My purpose to post this in public was to invoke a discussion and try to get some answers which we all have.

    • Dhan 11:53 PM on July 28, 2011 Permalink | Reply

      Have never had trouble with bribes,in the scales you have written about, so far (touch wood).Applied for my passport through the Calicut passport office.Paid 50 bucks to the guy who came for verification in the hostel(Said he needed it for photocopying documents :D ) and 0 to the guy who came to my house in Chennai.

      • Kartik 9:54 AM on July 29, 2011 Permalink | Reply

        Lot of people have had different experiences. Some paid even more than me (as mentioned in the first comment).

        And now, as you are In the North, you might witness it more often. ;)

    • Girish 11:27 PM on August 18, 2011 Permalink | Reply

      Had applied at the calicut passport office like dhan paid around 20 bucks for the verification…….you have certainly made your point……….but truly a lokpal bill is not the answer ….legal reforms ..police reforms are more important…..wat this bill would do is create another body and do you think only altruist wud be part of the lokpal………………if this bill is passed it will certainly create a wrong precedent there will be a day in the future where “anna dubare” would fast to make a “LOKPALO KA LOKPAL”

      • Kartik 1:26 AM on August 19, 2011 Permalink | Reply

        If you have read the differences between Lokpal and Jan Lokpal, you know that there are effective methods to curb the corrupt within the Jan Lokpal system.

        Maybe Jan Lokpal is not the answer, but what government is proposing – Lokpal – will not be of any use either. Singapore has a similar system too which according to many is quite effective there.

    • Noor Manseel Mohammed 11:41 AM on October 23, 2011 Permalink | Reply

      Hey Kartik,

      I accidentally came upon your blog, and happened to read about the bribe regarding passport. I thought I would share my experience, which is wonderfully at the opposite pole from your’s. Just felt like sharing that there are some exceptional things too, happening here in India.

      I was studying at Model Engineering College, Kochi when the passport verification came, while my native place is in Kasaragod. So I had to verify at both the police stations, ie home town Kasaragod and in Kochi as well.

      From Kasaragod, the policeman called me to the town station. I went alone, everything was so smooth and normal, other than I had to wait an hour, which inturn was my mistake, as I reached late from the time he asked me to reach. I didn’t have to pay any single penny as bribe.

      Even admirable thing happened at Kochi. One policeman came to college asking whether I am student there. Silly college office staffs told him there is no such a student in the college. I think there was some mistake in the year of admission, I mentioned in the passport application. But the policeman did not leave immediately giving negative report, but rather hung around the college and enquired some more ppl and finally found me out ! He chided me for not giving correct information.

      Then he asked me for original school certificate, which was in my rented house, a bit away from the college. I went house in bike, followed by the policeman in his bike. I was damn sure I will have to give bribe, since there is no one in the home, other than me and him. So he can openly demand bribe without fearing anything. Me a young student as well. But he was extra ordinarily elegant, polite, but very firm and checked my certificates, and left without demanding a single rupee. He even gave me a small class regarding the location of the police station(I didn’t know where was it), how and whom to contact in case of any issues etc etc. That day, I really felt proud of him, Kerala police, as well as the whole country.

      Really wish I met him again to thank him, as I was surprised that day that I couldn’t talk to him.

      P. S : And yeah, passport reached immediately within few days :)

      • Kartik 2:20 PM on October 23, 2011 Permalink | Reply

        Thanks for sharing your story Noor. :-)

        After reading your comment and many others’ I have come to the conclusion that there are both type of policemen everywhere as there are both types of people everywhere – good and bad.

        We need not caste a stereotypes but it does help to be able to differentiate between them. But it should not be forgotten that corruption does exist deeply rooted in our country.

  • Kartik 10:11 PM on July 14, 2011 Permalink | Reply
    Tags: , , ,   

    Remove Orphaned Actions in Drupal 7 

    I recently discovered this weird behaviour by drush when I disabled Comment module in Drupal 7 – drush was giving the following warning whenever I tried enabling/disabling any module:

    WD actions: 3 orphaned actions (comment_publish_action, comment_save_action, comment_unpublish_action) exist in the actions table. Remove orphaned actions

    After some scrounging on drupal.org (where most solutions were meant for Drupal 6), I found the solution at http://blog.devkinetic.com/node/9 Just execute the following once:

    drush php-eval "actions_synchronize(actions_list(), TRUE);"

     
    • Max Nylin 11:53 AM on August 17, 2011 Permalink | Reply

      Thank you for spreading this, just what I was looking for.

      / Max

    • Kyle 8:15 PM on August 19, 2011 Permalink | Reply

      Yea, this bites me every once in a while, and going to the “orphans” URL doesn’t always work. This works great! Thanks.

      • Kartik 8:48 PM on August 19, 2011 Permalink | Reply

        That ‘orphans’ url method is meant for Drupal 6 only.

        Thanks for your comment. :)

  • Kartik 12:07 AM on July 11, 2011 Permalink | Reply
    Tags: , , , , Google, , Social media, Social network, Twitter   

    Disconnect – An Experiment 

    This will be short.

    A small announcement:

    I will be out of touch for about a week on the Internet. Disconnected on all social networks (including twitter) and off-line on chats (including GMail chat) and unavailable on SMS. I have already disabled all email and SMS notifications from the social networks. This is just for the sake of experimenting to see if I can still live without social media, so don’t get weird ideas about this.

    I have decided to introspect, give myself a break, finish that huge list of tasks in my to-do list and see how it goes without all those distractions. I have been disconnected earlier (those power cuts, and infrastructure failures) but those times I was desperate to connect, this time it’s different – it’s intentional. May be I will write about my experience later.

    For the case of crisis, I will still be available on phone and email (which I pledge to check no more than once in a day) for those who can already connect with me through these media.

    Signing off

    • Kartik
     
  • Kartik 12:00 AM on July 9, 2011 Permalink | Reply
    Tags: , , , , , Joomla, , , MySQL, , ,   

    Easiest Way to Setup a Web Development Environment on Ubuntu-based Distros 

    Did you know how easy it is to get a basic web development environment on your Ubuntu-based Linux distribution? Guess what, it just takes 2 commands on the Terminal:

    sudo apt-get install tasksel

    This will install a small utility which lets you install a lot packages grouped together as software collections.

    sudo tasksel

    Launch tasksel and select ‘LAMP server‘ by pressing the SPACE key, press ENTER when you are done (see attached screenshot). It will take some time for the required packages to download and install. Near the end of setup, the installer will ask you to create a password for MySQL‘s root user.

    Select LAMP Server among the choices in Tasksel

    Select LAMP Server among the choices in Tasksel

    After the installer finishes, you have the environment ready. Head over to your favorite browser and open http://localhost If everything went fine, the page will say It works!

    It works!

    It works!

    Now you can start creating websites by putting your html, php, etc. files under /var/www directory or just choose to go with CMS solutions like Drupal, WordPress or Joomla.

    The author also recommends to install phpmyadmin package if you happen to work with MySQL databases.

    An edited version of this article first appeared at http://www.muktware.com/articles/08/2011/1348

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.

Join 417 other followers