Skip to content

Instantly share code, notes, and snippets.

View hindenbug's full-sized avatar
💻

Manoj hindenbug

💻
View GitHub Profile
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
# Install dependencies

Keep reading and watching videos, but cut that time down in half and use the rest of the time for exploring codebases and writing code of your own. If you do a code reading exercise, make sure you have the code open in your editor, and that you're able to interact with it via a REPL, its tests, etc.

Then from there, I'd recommend starting with very small, tiny projects. Ideally your first one should be something so simple you can do it in an hour or two.

Gradually work your way up from those tiny projects to slightly bigger ones. So start with one that takes an hour or two, then move up to one that might take 5-10 hours, then one that might take 20 hours, then 40 hours, etc. It's OK to stop at the size where you're feeling you're getting the most learning benefit.

Each time you try a new project, make it realistic if you can, but don't worry too much if you'll actually use it. The value is in having a rich context to try out ideas, not in the actual utility of whatever you build.

For each project you wor

I think you might benefit from a detailed study plan when you're a little further along with your studies. For now, I'd recommend following your interests, and taking a project-based approach towards learning.

Start with an idea of something you might want to build, and then make a list of all the stuff you'd need to learn to build it. Then, strip down the idea to make it a little more simple, and redo the list. Keep doing that until you have a list that's small enough to manage

Fair warning: full-scale applications tend to look like "first invent the whole world, then build your app", so you may need to come up with really simple ideas to start on. That's OK! You may also not know what you need to know until you try building things, that's OK too.

Once you have a few ideas, start reading and watching videos related to the technical tools and concepts you need. But only go just as deep into those resources as you need in order to build one small piece of a real project... you can always come back later i

@TomK32
TomK32 / album_spec.rb
Created April 12, 2010 21:17
Example for testing mongoid assocications with Rspec/shoulda
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Album do
before :each do
@website = Factory(:website)
@album = @website.albums.build(Factory(:album).attributes)
@album.save
end
it "should be valid" do
@album.should be_valid
class Feature
include Mongoid::Document
field :body, :type => String
embedded_in :suggestion, :inverse_of => :features
has_many_related :votes, :as => :votable
end
@iamnader
iamnader / gist:641569
Created October 22, 2010 23:58
Mongoid Set Defaults Rake Task
require 'config/environment'
require 'mongo'
namespace :mongoid do
desc 'Update defaults'
task :defaults do
db = Mongoid.config.master
models.each do |m|
m = eval m
@yuribossa
yuribossa / gist:716577
Created November 26, 2010 11:17
Simple Popup Message based on jQuery Mobile
function jqmSimpleMessage(message) {
$("<div class='ui-loader ui-overlay-shadow ui-body-b ui-corner-all'><h1>" + message + "</h1></div>")
.css({
display: "block",
opacity: 0.96,
top: window.pageYOffset+100
})
.appendTo("body").delay(800)
.fadeOut(400, function(){
$(this).remove();
@millisami
millisami / gist:721466
Created November 30, 2010 10:16
Mongoid Dirty Tracking
%w(rubygems mongoid rspec).each do |gem|
require gem
end
require 'hijacker'
Hijacker.configure do
uri 'druby://localhost:8787'
end
Mongoid.configure do |config|
name = "dirty_track_test"
@sleistner
sleistner / mongoid_step_definitions.rb
Created February 7, 2011 20:16
factory_girl cucumber step definitions using mongoid
FactoryGirl.factories.values.each do |factory|
if factory.build_class.respond_to?(:fields)
factory.build_class.fields.map(&:first).each do |field|
human_field_name = field.downcase.gsub('_', ' ')
Given /^an? #{factory.human_name} exists with an? #{human_field_name} of "([^"]*)"$/i do |value|
Factory(factory.name, field => value)
end
Given /^(\d+) #{factory.human_name.pluralize} exist with an? #{human_field_name} of "([^"]*)"$/i do |count, value|
count.to_i.times { Factory(factory.name, field => value) }
@adomokos
adomokos / tracks_controller.rb
Created April 15, 2011 03:50
This code is to demonstrate how I use test doubles for Rails.
class TracksController < ApplicationController
def index
signed_in_user
end
def new
@track = Track.new
end
def create