What Server Powers A Site?

At times, it’s funny that you might want to know the server that powers a site. If you have curl on your machine, Windows, Linux, Mac OS, etc, just try this simple command:

curl -i http://www.po3w.com

When you run the command, you’ll see something like:

curl -i http://www.po3w.com
HTTP/1.1 200 OK
Via: 1.1 IPGW
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Date: Thu, 12 Dec 2013 15:37:04 GMT
Content-Type: text/html; charset=utf-8
ETag: “1015FC56_23FFEBBA_EF9F9626”
Server: Google Frontend
Set-Cookie: JSESSIONID=C67gf5RyNznphpXtkhOA1g;Path=/
Cache-Control: private, max-age=0, must-revalidate
Vary: Accept-Encoding
Alternate-Protocol: 80:quic,80:quic

Look out for the Server: line, if any. Yours should vary, depending on the server that powers the site. At times, it may not be there. If it’s there, then you’ll have known the server that powers the site. I’ve really been trying it out on some sites lately to discover that nginx has really been gaining much ground. Kudos to the wonderful minds that are making it work. Why not try it out now?

If, don’t have curl on your PC, please head over to Curl site. The site has got impressive list of OS that it supports. For those on Windows, you may still need a .dll msvcr110.dll on your PC, to be able to run curl, if it’s not there. Curl can really be used for many wonderful things, and you can even call it from your scripts or programs to provide a helper function, if you need any.

Check out their help file for more details, I want to avoid the problems of duplication. If the data that came back when you ran the command seems overwhelming, direct it to any file of your choice, e.g.

curl -i http://www.po3w.com > po3w.txt

Finally, open the saved, po3w.txt file and check out the start of the file for the details that you need. Please note that the file you directed the command output to will reside in the directory you work with.

Understanding Source Codes

I have a problem: understanding some Java source codes that were built by a team. It’s a complex system with 42 MySQL database tables. Hibernate was extensively used and the worst part of it is that the codes weren’t documented as it should have. If you were to be in my shoes, what would you do?

Now, before you answer my question, do remember that there’s a deadline at hand and you are meant to implement something as quickly as possible. You job is on the line if you can’t produce a result. Now, I ask again, what would you do?

I would also like to tell you that I never knew when the software was built but was called upon to help manage it. Luckily for me, I still have someone I could ask some questions every now and then but he’s got his own jobs to do too! So, why put my load on him?

I finally turned to Understand. This is a tool that I’ve used extensively on Windows and I wished I could make use of it on my Linux PC, Ubuntu 10.04. On a second thought, I visited their site and found that I could get a Linux version from there! I’ve downloaded and I’m now running it.

understanding-java-codes

Understanding Java Codes

If you fall into a situation similar to mine, please head over to Understand to download one and stop complaining. Well, it all boils down to how and why one should documents his/her codes.

We’ll talk about this much later. Please watch out.

Dropbox on Ubuntu

I really got Dropbox to work on Ubuntu not long ago because everything was really straight forward. The following details will show you how to achieve the same thing too. Dropbox is a great service for saving up data online. Please note that my Ubuntu version is 11.04.

I downloaded the 32bit .deb of Dropbox from this link and ran the following commands, sudo dpkg -i dropbox_1.6.0_i386.deb, after changing to the directory that contains the downloaded .deb. It finished installing some stub and attached itself to the Applications–Internet menu.

I then clicked on it and allowed it to download the full program and attached its icon to my Panel, for easy access. I then configured it to connect to an online account and also made sure that it did not download the things I already have online to my the PC.

Wine on Ubuntu

In The Beginning

I got Wine to help install SQLYog, Navicat Premium and WebAcapella on my work PC, Ubuntu 11.04. It’s cool. I was able to draw an ERD for a database that powers one of our software. This Apache Struts program is in the process of being upgraded and optimized for queries which I’ve been assigned to do.

Matters Arising

I couldn’t get my head to wrap around the monstrous MySQL DB with the many InnoDB tables, so I needed a diagram. Navicat Premium did the magical job and I used a transparent tape to get them all together. The results afterward is beautiful.

The Love Continues

I’ve had to watch the ERD and feel happy at the powers in my finger tips with the bird-eye view I’ve got from my ERD. Within some few hours, I’ve figured out many problems leading to slow queries in our database, and it continues like that.

The Way Forward

This software is meant to benefit the world at large, I can’t wait to see smiles on the faces its users. Need Consulting Help on Database, Windows, Python, Programming? Please fill the form below.

Windows Batch File for Portable Python

Open a notepad and type the following things into it:

echo off & prompt $

set path=%cd%\app;C:\windows\system32;C:\windows

cls & start title .–.

Save it as config.bat and then make sure that it is saved in the home directory that contains IDLE-Portable. If you did this correctly, just click on the config.bat whenever you need to use your Portable Python.

Portable Ubuntu Program

Portable software on Linux is almost a no-go area because of the architecture of Linux. Many people with Windows background will readily yearn for something of such if they are just coming into the Linux environment. Someone has decided to grab the bull by the horns- I guess he is well-fed in C and C++.

Download this .deb and install it with the command sudo dpkg -i runz-framework-0.9.0.3.deb. Please do not forget to cd to the directory that contains the .deb before you use the sudo command. You will br prompted for your password and then it will install the package for you. Once you are through with this process, visit the main site to download and install any program that you find interesting. To start any downloaded program, just double click on it!

You could also download their Super_OS to get a precompiled binary with many software with it. This will help anyone to have hands-on Linux experience without the need to download and compile many things, which may be technical at times, and also require internet.

If you want more, please visit.

Portable Python with BPython

You need to do the following to achieve the same effect that I got on my PC. It’s easy to do. You only need to know how to move about on your PC with the command line and then an internet to download required packages.

  1. Visit Portable Python 2.7.5.1\App\Lib\site-packages on your  command line with the CD command
  2. Assuming you’ve finished with Step 1, the easy_install.py should be in the directory you got to in Step 1
  3. CD PATH_TO_Portable Python 2.7.5.1\App\python.exe easy_install.py bpython and allow the package to finish with the installation and configuration
  4. Download curses-2.2.win32-py2.7.exe and extract its files with WinRAR
  5. Copy the files _curses-2.2-py2.7.egg-info, _curses.pyd and _curses_panel.pyd into PATH_TO_Portable Python 2.7.5.1\App\DLLs
  6. Subsequently, move to PATH_TO_Portable Python 2.7.5.1\App\Scripts and run bpython.exe from the command line

If you follow the above 6 steps properly then you should have a screen that looks like the one below.

bpython_pix

Portable Python with bpython

bpython is cool in that it offers code completion, ability to save, etc, all from the usual, intuitive command line. Big ups to the developers of it and Pygments.

Python On USB

Learn how to develop, compile and distribute programs using Portable Python. I will gradually lead you to the point where you will feel comfortable with programming on-the-go. Think of the possibilities: build web and desktop apps without carrying your PC about. All you need is a flash drive containing the compilers and libraries and when you get to a PC, just plug in and develop! If you also want to make some money with your developed apps then it’s all yours to decide.

The following demonstrations were done with Portable Python 2.7.5.1. If at anytime there is an update to the version then you may have to work harder for the following demonstrations to work for you.

This tutorial will be developed in a gradual manner. So, if you feel some things are still missing, do check back to view it or follow us. You can find the whole libraries and MySQL server bundled together by me if you click here. If you need just the libraries and MySQL server bundled together, then click here. Their sizes differ!

We will use autopy, PyPDF2, mechanize, BeautifulSoup, bitly_apiCyMySQL and a Portable MySQL Server. Should you need more precompiled libraries, click here. The demonstrations here are just little, you’re limited only by your imagination!

Please visit the individual linked libraries pages and download the appropriate file to be used for Portable Python 2.7.5.1 or get all from this bundled download.

Follow us on Twitter, join our Facebook group and/or like our Computer IT Skills or DailyRealTalks fanpages.

If you feel comfortable in the following listed things then you are good-to-go: since we’ll be working on Windows, I expect the learner to know the following How To:

  • Run the Command Prompt
  • Change to a drive on the Command Prompt
  • Change to a directory
  • Drag and drop files and folders
  • Copy and paste things

As a new addition to this demonstration, I’ll show you how to use grab 0.4.13. The beauty of showing you how to use Grab is because it has dependencies like CURL (a .msi installer) and lxml (already with the Portable Python), which will be available on the PC before your Python script can compile. Grab is also used for scraping. If you have installed an earlier Python version on your PC then you need to be specific as to the Python version you want to use to run your scripts.

This little method will do:

  1. Change to the directory containing the python.exe on your Portable Python
  2. Type .\python.exe [your script full path]
  3. If you tried the above two steps then you get errors complaining of not seeing a file
  4. Change to the directory containing the script you want to run
  5. Type PATH\TO\PORTABLE_PYTHON’S\python.exe YOUR_SCRIPT.py

Learn how to use easy_install (present in the Portable Python) to install bpython interpreter to have a beautiful interface with code completion, etc. View it.