technology and zen of life

“A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.”

Instagram – Using the API

First a short introduction on Instagram, it is an iphone app for taking pictures, adding filters to make them look retro, and then for sharing them with sites like Twitter, Flickr, Tumblr, and Facebook, more importantly, it’s a simple social network of other people’s photos. You can “like” or comment on the photos, and see what’s new. It’s easy and doesn’t take much time or effort. This is one of the reasons it has become so popular so quickly.


What is also good to know is that Instagram has recently released an API which the user’s can use to fetch pictures that users upload to the website. In this article I want to discuss that API and how to use it to make the most out of it.

Read the rest of this entry »

WindowsXP: Using the Command prompt to see and kill processes

If you are a WindowsXP user then you must be already familiar with the life-saving graphical tool called “Task Manager” on Windows. Whenever the PC starts hanging and the processes start eating up a lot of memory (Sadly most of the time its Firefox for me), we press the alt+ctr+del key to bring up the the “Task Manager” and try to kill the memory eating processes and the ones which are “not responding”. Well, you should also know that this can be done efficiently from the command prompt as well by using the task manager command prompt alternative and kill processes from command prompt.

As my project work requires writing and running codes, I generally have at least one Windows command prompt open. If this is the case with you then it is much faster to manage your windows processes from command prompt than to open up the Task Manager, just like we do on Linux using “ps” and “kill” command. Get to know the following commands and you can easily use the command prompt to see and kill processes.

1. Tasklist : This command is similar to “ps” command on Linux and is used to see the details of the programs and processes that are running in Windows. Tasklist can be applied to see how much memory and CPU time running processes are using, what DLL files they rely on, and other information. Thus it can be a very useful troubleshooting tool.

  • Processes info: When you enter tasklist on the command prompt, you can see the following informations by default. Image Name, PID, Session Name, Session#, Mem Usage
  • Processes detailed info: Additional info like, Status, User Name, CPU Time, Window Title can be displayed using tasklist /v
  • Services and Processes info: Use tasklist /svc to get a table relating Image Name, PID, and Services, very useful to know the relationship between a process and the services that are running on a system.
  • dlls and Processes info: Tasks and Use tasklist /m to find which DLLs are used by each process.
  • Filtering processes: Processes can be filtered using ImageName, PID, MemUsage, Status, Username and WindowTitle. For Example,
    • Use the following command to to find processes that are not responding.
      • tasklist /fi "status eq not responding"
    • Use the folliwing to list the processes eating up more than 10MB.
      • tasklist /fi "memusage gt 10000"
  • More Info: To get more info on advanced syntax of the command use tasklist /? or refer to Microsoft’s documentation.

(NOTE: Although Tasklist is a part of Windows XP Professional, it does not come with the Home edition. Those with the Home version of XP can download this file and can put it in the system path.)

2. Tskill : This command is used to end a process, using its name of its PID.

  • Kill with name: Use tskill processname to kill a process with name processname. For example:
    • tskill winword (closes all the Microsoft documents that you have open)
  • Kill with PID : Similarly use tskill processid to kill a process with PID processid. Tasklist can be used to find the PID of a process.
  • More Info: To get more info on advanced syntax of the command use tskill /? or refer to Microsoft’s documentation.

(NOTE: Tskill is a part of both Windows XP Professional and the Home edition.)

3. Taskkill : Similar to Tskill, this command is also used to end a process but it provides us more options in doing so. Apart from specifying the PID or the image name of the process to kill, we can also use ceratin filters to kill the matching processes as explained below.

  • Kill with name: Use taskill /IM imagename to kill a process with the given Image name. For example:
    • taskkill /im notepad.exe /f (forces notepad to be killed.)
  • Kill with PID : Use taskill /PID processid to kill a process with the given processid.
  • Filtering Taskkill: Processes to be killed can be filtered using ImageName, PID, MemUsage, CPUTime, Session, Status, Username, WindowTitle, Services or Modules (dll). For Example,
    • Use the following command to forcefully shut down all the processes that are not responding.
      • taskkill /f /fi "status eq not responding"
    • Use the folliwing to close down all programs using more than 10 MB..
      • taskkill /f /fi "memusage gt 10000"
  • More Info: To get more info on advanced syntax of the command use taskkill /? or refer to Microsoft’s documentation.

(NOTE: Taskkill is only a part of Windows XP Professional.)

So Enjoy using the task manager command line version!

Go on, show the power of your commands to the processes. Happy killing them. 😉

(Extra Note (Added for my own safety) : I am not responsible if anything goes wrong, while trying out the commands given here.)

Make a Live USB disk for any Linux distribution

How many of you feel frustrated having to burn a CD/DVD every time you want to try on a new OS? Well UNetbootin helps create bootable USB drives, which you can use either as a live CD or as an installation media.

UNetbootin is a very handy tool, which runs on both Linux and Windows and offers a wide variety of operating systems that you can choose to load to your USB disk. It can even download all the popular distributions off the internet for you. It can also be used to boot many system utilities from the USB disk. It uses syslinux to make the USB disk bootable and thus any distribution or utility that can be booted via the syslinux interface works with UNetbootin.

UNetbootin offers two variations for installation. One is to create a USB disk and the other is a “frugal” install. A frugal install means that the iso resides on your hard disk and only the boot loader is reconfigured to run load the compressed kernel image from the hard disk, which can then be used to install the OS, or just run as a live CD.

Using UNetbootin is quite easy. If you are on windows just run the utility and you will be provide with a screen like this:

screenshot

Now you can either choose an operating system or specify your own ISO image for which you want to create the bootable USB disk.

The second option is to specify the USB disk or the hard disk (in case of frugal install) and you are all set. The target disk is not formatted so you will not lose any existing data on the disk.

What’s more it supports 9 different languages but if you want to change the language the only way you can do that is by providing command line argument <lang = xy> where xy is the language code. Here is the list of languages supported with their codes

  • English (en)
  • Español / Spanish (es)
  • Português / Portuguese (pt)
  • Français / French (fr)
  • Italiano / Italian (it)
  • ?? / Simplified Chinese (zh)
  • ??????? / Russian (ru)
  • Norsk bokmål / Norwegian (nb)
  • Magyar / Hungarian (hu)

Links:

UNetbootin Homepage

NTLM authentication proxies

continuing from the last post. If your network is all Windows based, then using the tricks mentioned in the previous post are of no use to you. That’s because Windows servers use NTLM authentication. It’s different from normal authentication, in the sense of a user, you won’t be able to use Linux happily on a network with that kind of authentication scheme. You need to keep an eye on how to use this tip to your benefits.

You need this to create your very own NTLM workaround proxy server. It’s called NTLM Authorization Proxy Server.

Setps for those-who-don’t-know-and-want-to-learn

  1. Download the NTLMAPS script.
  2. Download python.
  3. Unzip the NTLMAPS zip file and install python.
  4. Configure(edit and save) the server.cfg (read below).
  5. Double click on runserver.bat

voila, you see a console!

Configuring the server.cfg

You will need to modify these variables in the config file named “server.cfg” according to your network needs

LISTEN_PORT:5865

PARENT_PROXY:your_parentproxy

PARENT_PROXY_PORT:8080

NT_DOMAIN:your_domain

USER:username_to_use

PASSWORD:your_nt_password

And these variables if you need, normally they won’t require a change, but you might need to.

LM_PART:1

NT_PART:0

SCR_DEBUG:0

ALLOW_EXTERNAL_CLIENTS:0

FRIENDLY_IPS:

For me the configuration looks like

LISTEN_PORT:4000

PARENT_PROXY:10.100.56.45

PARENT_PROXY_PORT:3128

NT_DOMAIN:your_domain

USER:200301001

PASSWORD:

LM_PART:1

NT_PART:0

SCR_DEBUG:0

ALLOW_EXTERNAL_CLIENTS:0

FRIENDLY_IPS:10.100.90.90 10.100.96.69

Note, if you don’t fill in the password, it will automatically ask when you run the “runserver.bat” file.

So now it’s all done, tell me if you use it successfully, or failed at it miserably!


DarK is a Sony Vaio user who cannot learn enough about networks. He hates his laptop and loves it at the same time. You can catch him on twitter at http://twitter.com/abhishekchhajer

How to make your Linux applications use proxy

Hi,

If you are frustrated by Linux and your college’s network, which is windows based or sysadmins can help you with windows only, and sysadmins for a request call, replies as “use Windows”. If you are in a university then I am sure they use that damned( or good) software called as proxy (squid proxy to be specific). And you are a linux newbie then, here are some quick tips for you.

TIP # 1

You want your download manager (wget), updates by apt or aptitude to use a http proxy, you can type

export http_proxy=http://user:password@proxy:port/

or

export http_proxy=http://proxy:port/

Things to note here are

  • Type the command as it is, don’t leave unnecessary spaces.
  • Username/password is the username and password you use to access the proxy, that is the same password which you type when you access internet using a web-browser. If you don’t use one, then use the second version of the command
  • Proxy and port are the values that are the same as used in your web-browser, or you can ask check them out with your sysadmin, or anyone who has a working internet on the same network.

After you do this you can use apt or aptitude and it will use the http proxy you specified!


TIP # 2
For GNOME users : GNOME allows users to specify a proxy from a GUI, which you can find in

Preferences –> Network Proxy

It also allows you to specify username/password, by clicking on “Details”


TIP # 3
Using socks proxy with evolution (the e-mail client)You need a package named tsocks

sudo apt-get install tsocks

for Ubuntu users

or you can download it from here, http://tsocks.sourceforge.net

then just type

tsocks evolution

you might want to read the man page for configurations too.

So, that’s it. I hope it makes your life a little easier with Linux on network. Tell us about your experiences of using Linux behind proxies. Remember google search is your best resource!

DarK is a Linux newbie who is frustrated by network admins across India. His recent project is installing Linux-from-scratch. He is the How to’s master here!

Get your desktop E-Mail client ready for free IMAP for GMail – What does GMail IMAP change

OK, I have it enabled now. Free IMAP for GMail. But first for those who don’t know what IMAP is, go to this link . How is IMAP any different from POP3, or wait what I am talking about. I have this small FAQ for newbies.

Q. What is POP3/IMAP?

A. To simplify this, they are mail accessing protocols which are used by your Desktop E-mail Client.

Q. What is a protocol?

A. From wikipedia “A Protocol is a set of guidelines or rules that help in governing an operation on the internet and communications over it” . Simply put it’s a way to communicate over internet.

Q. What is a desktop e-mail client.

A. An e-mail client is a computer program used to manage e-mail. Few examples are

Linux : Mozilla Thunderbird, Evolution, KMail, Pine, Mutt (pine and mutt are console based)

Windows : Mozilla Thunderbird, Outlook Express (not free), Microsoft Outlook (comes as a part of Windows), Windows Mail (comes in windows Vista)

PS : This is by no means the whole list of E-mail Client available. This is just the list of client I have used in the past, and in the order of my liking.

Q. What is an E-Mail?

A. Seriously man, stop reading this! 😛 Anyways. Read this for information about E-Mail

Ok, so now we are out of the viscious cycle of jargons, lets come to the point. GMail has added IMAP service to their currently 4.4GB E-mail inbox. How does this matter to you. Well if you have a E-mail account with services like Yahoo or Hotmail, I can say IMAP wins over almost every service they have to offer.

Q. How? ( You can say to me, you dumb ##$##@$, that BIG editor gave Yahoo a better score than GMail!)

A. How does IMAP change your life. Well in simple terms, you might never need to open the web browser for any of your emailing needs. Is that big? Well lets add this to the list, unlike POP3, you can use multiple E-Mail clients at the same time on the same account. It means you can receive the same e-mail on your PDA, Laptop, Desktop and if you mark it as read on one of them, it will be marked read in all of them, it keeps everything in sync. You will love this feature if you have a history of using POP3 and the mails once downloaded and read are again marked unread once you shift to some other computer.

Q. I still don’t get it, how does it makes GMail any better?

A. Well any standard IMAP client can be configured to

  • Run in system tray, without take any place in the tasks list
  • Check one or more, e-mail accounts simultaneously
  • Check the accounts after a fixed interval, again and again and again, so that you don’t have to
  • Notify in case you get a mail

Q. Still doesn’t makes any sense to me!

A. Using and e-mail service with IMAP access (like GMail) and a desktop client you can send/receive your e-mail (with attachments) from your desktop without using a browser, and you will be notified of new mails automatically.

Q. Why is your english so bad!

A. I am working on it :-(

Q. So I what do I do now?

A. I’ll suggest create an account on GMail and see it working first hand.

This what IMAP changes for me and many other GMail users, although Google might have big plans with this offering !!!

Linux/Fedora 7 and ATI Graphics Card.. eh ?

Hello windows users!, and hello fellow Linux (in particular Fedora 7) users 😉

Yeah, I just installed Fedora 7 on my new Sony Vaio laptop, and it works great. I still have to figure out few new things, but I am happy as it’s working for almost everything I need(I just need a console, few manuals, a browser and Internet). Here are few tips for people who don’t find much help on ATI Graphics cards and Linux(in general).

  1. Install Linux in text mode, few Linux distro’s (like ubuntu) use graphical install, which won’t work for you. There are bootup commandline switches (generally accessible by hitting F1). Fedora 7 has command line installation option from the boot menu itself so it’s easy there. Note you might need ubuntu alternate disk to use the commandline install, I used alternate-install disk. Always try to get DVD versions of installations whenever possible.

  2. Fedora 7 DVD version has support for my Wireless Card (Intel(R) PRO/Wireless 3945ABG Network Adapter) out of box so it saved me hassle of getting on to a wired network for installing the ATI Graphics Drivers, which can be found at ATI website. Here is the kink in the story, I needed to download it from the website, and I don’t know how to use those text based browsers, so I needed to use laptop of my room-mate to get the link of drivers I needed.

  3. Used wget to download the drivers ( The link for Linux x86 32 bit computers is https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.40.4-x86.x86_64.run ) Pasted the link so that you can (type it for wget), Alternately the link is here.

  4. To install the drivers you need to execute this command

./ati-driver-installer-8.40.4-x86.x86_64.run –buildpkg Fedora/F7

If you are using some other distro of Linux you will need to find the correct switch, execute this command and read the instructions that come on your screen.

./ati-driver-installer-8.40.4-x86.x86_64.run

a useful hint is you will need something like

./ati-driver-installer-8.40.4-x86.x86_64.run –buildpkg <switch>

where <switch> is the missing argument.

5. One you get the things set, under Fedora 7, you will get about 5-6 RPM files, you might choose what you don’t want to install, but for me as a new user, I just installed all! If you are interested in finding out which file does what, then you might want to go on some IRC Channel to ask. Nuf said, to install the rpm files use

rpm -ihv *.rpm

in the directory where the driver rpm’s are present.

6. If you get dependencies error use

yum install <missing dependency filename>

under Fedora 7, I believe “apt” can be used in similar way

7. Type gdm while you are logged as root, or use startx as normal user

8. All done? You need to follow this link to get a graphical display on bootup

http://www.linuxquestions.org/questions/showthread.php?t=7381

9. All right reboot!, use reboot command on the console.

10. Post as comment what you see when you reboot :)

Note : This guide is written by a Linux newbie for Linux newbie, who has experience of working on Linux for few months, mostly for shell scripting and network programming, so he mostly worked on a terminal. Keep that in mind. This guide is written by sheer lack of Google results and support on forums for “Linux and Sony Vaio” or “Linux and ATI” when compared to “Linux and Nvidia” on any forum. Use it at your own risk. I am not responsible if anything goes wrong with your system/computer/laptop.

Bypassing that firewall

If you are sitting at your company office or are in a college, chances are that all or most of your traffic is monitored or blocked. Also if you are on LAN, then its quite probable that you access most of your internet using a single proxy sitting behind a NAT.

The downside, well limits to everything. In my own campus while just being unable to browse the simplest sites such as gamespot.com or bash.org, theres also limits on download filesizes [permissible limit being 75Mb]. To add to the discomfort, access on any port save 3128 or 80 is blocked, disabling access to torrents, p2p networks, mmorpgs or even NTP servers.

However, there is still a bypass. Well for the simpler things such as anonymity and freedom over browsing the net can be achieved using a tunneler such as Freedom[www.your-freedom.de] or Jap[http://anon/inf.tu-dresden.de/index_en.html]. All one needs to do is install the software, edit the configuration to specify their connection settings and choose a suitable server. Change your browser settings to use a proxy running on localhost at a port of your own choice.

For other things like running WoW behind the NAT/proxy, things notch up another tiny bit. Apart from a proxy software supporting either Http connect requests or allowing socks 4/5 connection (both Freedom and HTTP-Tunnel [www.http-tunnel.com] are good for this), another nifty software, Proxifier [www.proxifier.com] is needed. Simply putting it, Proxifier works like a translator taking all internet traffic from WoW and routing it to the proxy. To the game Proxifier remains invisible and hence faking a direct connection to the net. The same setup can be used to run applications like Bittorrent, Instant Messengers, Windows time or anything else needed a direct internet connection.

Email Subscription

Disclaimer

The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.