Skip to content

Instantly share code, notes, and snippets.

View subratrout's full-sized avatar

Subrat Rout subratrout

View GitHub Profile
subratrout / hci.rb
Created January 5, 2012 20:42 — forked from callumj/hci.rb
Download the Web Applications videos from Stanford's OpenClassroom.
require 'uri'
require 'net/http'
require 'fileutils'
BASE = ""
for l in 1..42 do
for p in 1..20 do
uri = "CS147L" + l.to_s + "P" + p.to_s + ".flv"
subratrout / The Technical Interview Cheat
Created September 30, 2015 14:38 — forked from tsiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
subratrout /
Created March 3, 2016 23:19 — forked from JoshCheek/
Modules (lesson from 29 July 2015) covers object model, namespaces, mixins, and functions.


To understand modules, we first have to understand a little bit about how Ruby works. So, lets define the things that exist in Ruby and see how they work together. Then, we will be able to understand how modules fit into this, and what they are here for.


subratrout / gist:e621e75f6e4c3eb0c46c85bf7bdd3ee9
Created May 11, 2017 06:01 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

subratrout /
Created June 22, 2017 21:11 — forked from erikreagan/
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

subratrout / capybara cheat sheet
Created August 3, 2017 23:04 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
subratrout / btc-eth-dca-buy.php
Created August 24, 2017 22:41 — forked from levelsio/btc-eth-dca-buy.php
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
// by @levelsio
// 2017-08-23
// 1) buy $40/day BTC
// 2) buy $10/day ETH
subratrout /
Created September 22, 2017 23:25 — forked from amysimmons/
Job Interview Questions

#A team

##What is Rails?

Rails is an open source web application framework written in Ruby. It is a full-stack framework that has been optimised for programmer happiness and sustainable productivity. It emphasises the use of well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), the active record pattern, and model–view–controller (MVC).

Extra: David Heinemeier Hansson (DHH) is the creator of Rails, having extracted it from his work on Basecamp. He first released Rails as open source in July 2004.

Useful Links:

subratrout / gist:0d0e56fd2038b1a93a85026a512b86f6
Created September 22, 2017 23:25 — forked from hiromipaw/gist:47fd3e4f3120dc8887b1
Interview questions reloaded

1. What is a class, what is an object and why we need modules

This may be simple, but it allows to start a conversation between two strangers involved into the same craft.


Classes are a blue-print, they may hold data, likely they hold methods; classes are directly connected with an idea of objects, because object is an instance of a class. As objects are first-class citizens in Ruby, there is a main, root class Object, and all classes are inherited from this root entity. Modules, generally, are a tool for mix-ins and they provide something we call a namespace. Modules cannot be initialised the way we can do this with classes, but they provide a multiple inheritance.

2. Who’s _why and what’s up with his Shoes?