Skip to main content

Posts

Sublime is my current home

Iam a sublime user currently, here are some of the shortcuts which i often use Closing a tab- ctrl + w opening the last closed tab - ctrl + shift + t Moving the cursor to a specific line - ctrl + g Opening a file- ctrl + p There's a lot of stuff to go into this from my side, will update when free.. Found this file, which list all the shortcuts nicely.

Adding a local repo to Github

You created a local repo in your m/c and then want to push it to github The github repo for your project has already been created on github. Either you have created it or has been added as one of the collaborators. When you create a project $ rails new app1 --skip-active-record --skip-bundle and want this to be associated to the repo cd to the project folder, $ cd app1 and then execute $git init $ git remote add origin git@github.com:analytics/app1.git then do $git pull origin master $git push So, the local repo has been pushed to the remote github repo

Starting with mongodb

 Create a new rails application for mongo, so let's skip active record as it's not required. rails new appname -- skip - active - record In case if want to skip bundle, append this --skip-bundle whereas if you want to use mysql as default append this -d mysql Use the following rails versions which are release after the security fix,       3.2.11       3.1.10       3.0.19       2.3.15 rails g mongoid:config Checkout for mongoid.yml for db configuration. Check for config/application.rb. it would have the below lines.  # Pick the frameworks you want: # require "active_record/railtie"  require "action_controller/railtie"  require "action_mailer/railtie"  require "active_resource/railtie"  require "sprockets/railtie"  require "rails/test_unit/railtie" Some basic things which can be followed for good practices. Setup RVM Then create a gemset, rvm gemset create a...

Git commands i was unaware of !

Git basics and continued ...! Add all the deleted files using 'git add -u'. This will add all the files in git including the deleted files. If you only want to add deleted files, try: git ls-files --deleted | xargs git commit Once you clone a project, check out the branches present using, git branch -a or git branch -r for remote branches. See the contents of any object using git show Check for the space occupied by object database to git count-objects -v git verify-pack -v .git/objects/pack/pack-*.idx To check if connection to host is established. ssh -vT git@github.com
Yahoo Open hack  Let's define Hack - Anything which reduces the effort and make things simple to handle. It has been over a month since the 5th Yahoo Open Hack Day Bangalore that took place on 11th - 12th August 2012 at Sheraton, Brigade Gateway. It was overall awesome experience with pool of hackers hacking over night sitting on their bean bags. Though some took power naps, none from our team felt the need. The excellent hospitality by sherlton and superb yahoo team headed by Anil Patel deserves more than just words of appreciation. Adding to that was indigo 91.9 covering the entire event nicely and the laser show on the first day. I heard there was some recreation room to refresh the tired minds, sad we didn't used that. We were a team of 4, Sandeep , Dayanand , Karthik  and myself , while karthik took over the front end work along with some efforts from sandeep, others worked on backend taking care of integrating and parsing all the required ap...
Two step google authentication is great. Today i has setup two step google authentication for gmail(though i'm very late to use that). After that when i started my mail client, it said the passwod is incorrect. For a fraction,  i could not realise what could be the issue and then i figured the application registration needs to be done. It's very simple and i have tried to explain it nicely. Options we can configure: Add a phone no and also can add a backup contact no. Configuring you applications i.e mail clients as they fail when you enter the password, Access the url: https://www.google.com/settings/account Go to this url as you are logged in, it redirects to gmail account settings page. Click security and and find the option Authorizing applications and sites. Click on Edit, and it asks for password. Once you enter the password it redirects to a screen which displays all the registered services. Enter the name of the application, like Gmail...
Start using regex   The below definitions have been pulled from  Regex Basics just to have a basic understanding before we start practising. I have just displayed some basic things used and would keep updating the post as the time permits. Literal     A literal is any character we use in a search or matching expression, for example, to find ind in windows the ind is a literal string - each character plays a part in the search, it is literally the string we want to find. Metacharacter     A metacharacter is one or more special characters that have a unique meaning and are NOT used as literals in the search expression, for example, the character ^ (circumflex or caret) is a metacharacter. Target string     This term describes the string that we will be searching, that is, the string in which we want to find our match or search pattern. Search expression     Most commonly called the regular expression. T...
Basic steps to setup RVM The next time you decide to install ruby for multiple applications, rvm is the best option to handle various versions easily. Just follow the below steps which i have compiled to make things clear and easy: Install rvm,Ruby 1.9.2 and rails 3.0.0 Execute the commands as specified: $ which ruby $ $ sudo apt-get install curl git-core ruby $ bash < <( curl https://rvm.beginrescueend.com/releases/rvm-install-head ) $ vim $HOME/.bashrc You need to replace the line that says         [ -z "$PS1" ] && return with         if [[ -n "$PS1" ]]; then Now add this to the last line of the file         if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi         f i Reload the environment by running $ source ~/.bash_profile or restart the terminal Now enter, $ rvm notes This lists the packages to be installed for various ...