Posts

Showing posts from September, 2013

Git Cheat Sheet

Image
The main operations in Git are clone, push and pull. 1. Clone a git repositor: git clone git_url e.g. git clone  git@github.com:Prinzhorn/skrollr.git 2. Push changes to git repo Use git add filename or use git add . to add files that needs to be puhsed to the repo, where . is for all changed files. Use git commit -m 'message' to add message about the changes made. Finally push the changes to the repo. e.g. git add . git commit -m 'design changes' git push  3. Pull changes from git repo git pull The above 3 operations are the basic git operations. You will perform daily. Some other operation you need are: 4. Create a new branch and switch to it git checkout -b new_branch_name  5. List all  branches (branch with * is the current branch) git branch 6. Switch branch  git checkout branchname 7. Rename a branch git branch -m old_name_of_branch new_name_of_branch 8. List all remote upstreams git remote -v  9. Add new remote st...

Received my Roku2

Image
Roku is a little TV set-top box that makes it easy to enjoy hottest movies, TV shows, music videos, games and more on your TV by streaming directly from Internet. Its has more than 1000 of channels including NetFlix, Hulu Plus, HBO Go, Vudu, PBS etc. It has beautiful applications like Picassa, Vimeo, Twitter, Facebook too. You don't need anything more than a TV and an internet connection to use this little device. You can use it with any of your old televisions or with you latest television sets. You can choose a model you want from Roku store . I received my Roku2 last week. And I am really loving it. Its awesome. Besides watching Movies and Videos I do some development for it, which was the main purpose of getting a Roku for me. As lots of Internet TV channel providers have emerged, there has been significant need of developers too. You can be a Roku Developer too. Recently I have developed 3 channels for Roku which are still in testing phases and are available as privat...

Use ADSL Router as a Access Point

Image
Here is a scenario, I have my internet connection from my neighbor and the router they have isn't a wireless one. I have an Ethernet connection to my room. But I want to have an wireless Access Point so that I can use my Android Device and my Roku. But alas, I don't have a wireless Acess Point. So what I did was used my ADSL router which had a wireless interface as an Access Point. And this made a Wireless Hotspot for me that I could use with my Android Device and Roku. :) So how to do that? Login to your ADSL Router and disable DHCP. Another thing you need to do is set a IP for the router. For example my the main router has IP 192.168.1.1 so I put my router to be of IP 192.168.1.2  And now what I need to do is connect the Ethernet Connection to LAN Port of the my Router. Viola, now it works perfect. And it should work for you.  In addition I did setup a wireless Key for my Router to make it secure. You better set a Key for your Router too. 

In Case you forgot your number

Image
This usually happens to me that. I forget my mobile number. What if you forgot yours, use the following codes to see you number: For NTC users dial:  *9# And you can see your NTC Sim Cards number as follows: MSISDN : 97798******** Similarly for Ncell dail:  *903# And your Ncell number will appear as follows: Your Number is 98********

Moving wordpress websites from one domain to another

Image
Today, I am going to write a post on how you can move your WordPress websites from one domain to another domain. Or say how you can upload your website you have developed in your local webserver i.e. http://localhost/website/ to http://www.website.com/. In this post, I am going to cover the basic steps that you need to move a website to a new domain. First of all move all the files to the root web directory of the new domain. Import the database into your new webhosting. 0. Change wp-config.php file with the database username, database password, databasee name Now its time to run some sql statements: 1.  Update the home url update wp_options set option_value=replace(option_value,'http://localhost/website,'http://www.website.com') WHERE option_name='home' OR option_name='siteurl' 2. Update the URLs of all WordPress posts update wp_posts SET guid=replace(guid,'http://localhost/website','http://www.website.com'); 3. Update links in contents of a...

Creating an EBS volume and mounting to EC2

Image
And yet again, I am back with a post on Amazon Web Services after so long time. Its just because I was quite busy with my freelancing projects and got no time to write blogs. Anyways, today I am going to help you create an EBS Volume and mount it to EC2. First of lets create an EBS Volume: 1. Login to AWS Console 2. Once logged in to go EC2 Dashboard 3. From EC2 Dashboard Go to Elastic Block Store [EBS ]-> Volumes from sidebar menu 4. Create a new volume in the region of your EC2 intance so that it becomes available for use by your EC2 instance. ->Volume Type:  Standard Volume -> Size: 25 GB or your requirement -> Availability zone: should be of your EC2 instance's zone -> Snapshot : No snapshot Once the volume is created, you can attach the drive to the EC2 instance by Right clicking and clicking on attach. Now lets mount the volume to EC2. 1. SSH login to your EC2 instance 2. ls /dev/  -> should list your new volume which would be something like x...