Skip to content

Instantly share code, notes, and snippets.

View harshalbhakta's full-sized avatar

Harshal Bhakta harshalbhakta

View GitHub Profile
public void loadUpdates(boolean loadWordADay)
{
try
{
if (Util.isNetworkAvailable(this))
{
sendProgress(ProgressMode.UPDATE_STARTED.ordinal());
//-- Update Word of the day
if(loadWordADay) {

Generate new rails app project

Create a new app specifying the rails version & database.

$ rails _3.2.11_ new learnapt-web --database postgresql --skip-test-unit
@harshalbhakta
harshalbhakta / all_packages.sh
Last active December 15, 2015 09:48
Setup Ubuntu + Git + Rails + Vim + Postgresql
# copy command to clipboard
$ sudo apt-get install xclip
@harshalbhakta
harshalbhakta / rails_comments_sample.rb
Last active December 13, 2015 20:09
Rails class commenting empty template.
##
# Class description
# goes here.
class State < ActiveRecord::Base
#-- attributes
attr_accessor :id, :name, :slug, :country_id
#-- validations