Tuesday, April 17, 2012

htop process monitor

htop is just like top, but on steroids.

Once you are used to htop, you’ll never go back to top again.

htop is a ncurses-based process viewer.....

Install Htop :-
# apt-get install htop / # yum install htop
        or  
Source download Htop
tar xvfz htop-0.9.tar.gz
cd htop-0.9
./configure
make
make install 


#htop
















Comparison between htop and top :-
  • In 'htop' you can scroll the list vertically and horizontally to see all processes and complete command lines.
  • In 'top' you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).
  • 'htop' starts faster ('top' seems to collect data for a while before displaying anything).
  • In 'htop' you don't need to type the process number to kill a process, in 'top' you do.
  • In 'htop' you don't need to type the process number or the priority value to renice a process, in 'top' you do.
  • 'htop' supports mouse operation, 'top' doesn't
  • 'top' is older, hence, more used and tested. 

Thanks,
Vishal Vyas

Wednesday, April 11, 2012

How to Set Up Git on Windows

This is the guide for setting up git in Windows. There are also guides for OS X and Linux.

GIT

First: Download and Install Git

At the heart of GitHub is an open source version control system (VCS) called Git*. Created by the same dudes that created Linux, Git is responsible for everything GitHub related that happens locally on your computer.
  1. Download and install the latest version of Git for Windows.
    Use the default options for each step.
    Welcome pageInformationSelect destination locationSelect start menu folderSelect componentsAdjusting your PATH environmentConfiguring the line ending conversionsInstallingInstallation complete
    Do not use PuTTY if you are given the option. GitHub only provides support for openssh.

Next: Set Up SSH Keys

We use SSH keys to establish a secure connection between your computer and GitHub. Setting them up is fairly easy, but does involve a number of steps.
To make sure you generate a brand new key, you need to check if one already exists. First, you need to open Git Bash (not the Windows command line), found in the Start Menu in the “git” folder.
Open the terminal

  1. Check for SSH keys. Have an existing key pair? You can skip to Step 4.
    First, we need to check for existing ssh keys on your computer:
    $ cd ~/.sshChecks to see if there is a directory named ".ssh" in your user directory
    If it says “No such file or directory“ skip to step 3. Otherwise continue to step 2.
  2. Backup and remove existing SSH keys.
    Since there is already an SSH directory you’ll want to back the old one up and remove it:
    $ lsLists all the subdirectories in the current directoryconfig id_rsa id_rsa.pub known_hosts$ mkdir key_backupmakes a subdirectory called "key_backup" in the current directory$ cp id_rsa* key_backupCopies the id_rsa and id_rsa.pub files into key_backup$ rm id_rsa*Deletes the id_rsa and id_rsa.pub files
  3. Generate a new SSH key.
    To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
    $ ssh-keygen -t rsa -C "your_email@youremail.com"Creates a new ssh key using the provided emailGenerating public/private rsa key pair.Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<press enter>
    Now you need to enter a passphrase.
    Enter passphrase (empty for no passphrase):<enter a passphrase>Enter same passphrase again:<enter passphrase again>
    Which should give you something like this:
    Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub.The key fingerprint is:01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.comThe key's randomart image is:+--[ RSA 2048]----+|     .+   +      ||       = o O .   ||        = * *    ||       o = +     ||      o S .      ||     o o =       ||      o . E      ||                 ||                 |+-----------------+
  4. Add your SSH key to GitHub.
    On the GitHub site Click “Account Settings” > Click “SSH Keys” > Click “Add SSH key”



    Open the id_rsa.pub file with a text editor (Notepad, TextEdit, or gedit will do just fine). This is your public SSH key. You may need to turn on “view hidden files” to find it because the .sshdirectory is hidden. It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace. Now paste it into the “Key” field.
    Now paste it into the “Key” field.
    Paste your SSH Key
    Hit “Add Key.”
  5. Test everything out.
    To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@vishalvyas.com” part. That’s supposed to be there.
    $ ssh -T git@vishalvyas.comAttempts to ssh to github
    Which should give you this:
    The authenticity of host 'vishalvyas.com (192.168.1.1)' can't be established.RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.Are you sure you want to continue connecting (yes/no)?
    Don’t worry, this is supposed to happen. Type “yes”.
    Hi username! You've successfully authenticated, but GitHub does not provide shell access.

Then: Set Up Your Info

Now that you have Git set up and your SSH keys entered into GitHub, it’s time to configure your personal info.
  1. Set your username and email.
    Git tracks who makes each commit by checking the user’s name and email. In addition, we use this info to associate your commits with your GitHub account. To set these, enter the code below, replacing the name and email with your own. The name should be your actual name, not your GitHub username.
    $ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system$ git config --global user.email "your_email@youremail.com"Sets the email of the user for all git instances on the system
  2. Set your GitHub token.
    Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token.
    On the GitHub site Click “Account Settings”
    Copy your API token
    At the command line run the following code, using your GitHub username and token in place of the ones shown.
    $ git config --global github.user usernameSets the GitHub username for all git instances on the system$ git config --global github.token 0123456789yourf0123456789tokenSets the GitHub token for all git instances on the system
    *Note* If you ever change your GitHub password, a new token will be created and will need to be updated.

    Thanks,
    Vishal Vyas

Tuesday, April 10, 2012

6 Extra Skills Every PHP Developer Should Have...

On PHPMaster.com today there's a new article with six things that they (well, Daniela Baker) thinks every independent PHP developer should know and have in their arsenal..



PHP development is hot right now, but there are also lots of people in PHP development. If you want to make it as an independent PHP developer you’ve got to know more than just PHP. Here are six other essential skills you need to succeed as a PHP developer.

 

 

1. JavaScript, HTML, and CSS

It isn’t enough these days to just know how to write PHP code. If you want to start a PHP business, you’ve also got to know how to properly code websites using HTML and CSS as well. Chances are likely that in your projects you’ll have to fix mistakes that designers make, so you’ll need to know how to do that – and how to do it well. If you don’t know these other languages along with PHP, you’re going to be outbid for many jobs by contractors who are much more well-versed in web development than you are.

2. Knowing What You Don’t Know

As important as it is to make sure you can do as much as possible towards developing websites, it’s also important to know what you don’t know. This is a skill some new PHP developers seem to forget when starting out in a market where it’s hard to find entry-level PHP development jobs. You’ve got to understand how to read proposal requests and how to put in bids on jobs that you can do competently. Otherwise, you’ll end up over committing yourself and damaging your reputation in the long run.

3. Business Communication

As a freelance or contract PHP developer, you’ll be the one communicating with all your clients. Learn how to use a phone to ensure that email messages are received, and learn how to communicate like a professional. Lots of techie types have trouble with basic business communication (which is probably why they choose to work at home by themselves in the first place). If this is you, go take a class on business communication, or talk to a professional about how you can improve these skills.

4. Business Finance

Again, as a one-man (or woman) business, you’ll be managing your own business’ finances. You don’t necessarily have to learn how to do your own taxes, which can be tricky for independent contractors, but you should certainly learn how to manage the day-to-day finances of your business. This includes learning how to set a fair rate for yourself based on the market rates and the taxes that you’ll have to pay out of your business income.

5. Project Management

As an independent contractor, you won’t have anyone over your shoulder begging you to get a project done by a certain deadline. You’ll also most likely be juggling multiple projects and multiple clients at any given time, so make sure you know how to manage your own time, write proposals, and manage the scope of your projects so that you can commit and deliver and build a great reputation for yourself.

6. Networking

Networking with other freelance PHP designers – and web development freelancers in other niches – can help you find more jobs and get referrals. Use Twitter, Facebook, and LinkedIn to network with other developers, as well as with clients you work for or have worked for in the past. Networking skills can be invaluable in a competitive job market.
According to Elance.com – one of the leading freelance sites for web developers and freelancers in many other niches – 2011 was a record year for online freelance work. Online hiring has more than doubled since 2010, and the number of businesses who are hiring on Elance more than doubled, as well. That spells good things for PHP professionals who have the skills they need to succeed.
These six skills are essential for most freelancers, but if you’re a PHP developer, they may be even more important. Web development is an extremely competitive field, and breaking in at the lower levels is tough. Once you’ve gained these skills and gotten your career rolling, though, you can enjoy exciting jobs, flexibility, and great pay as an independent PHP developer.

via http://phpmaster.com/6-extra-skills-every-php-developer-should-have/

How to Install docker-compose CentOS7

 Install Docker-compose on CentOs7 Linux. yum install -y epel-release yum install -y python-pip pip install --upgrade pip pip install ...