Skip to content

Instantly share code, notes, and snippets.

View g-ilham's full-sized avatar

g-Ilham g-ilham

  • Russian, Republic of Tatarstan, Kazan
View GitHub Profile
@g-ilham
g-ilham / gist:6b5d1ef8fbf5119e541bd2fc3c781529
Created January 23, 2017 19:42 — 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.

@g-ilham
g-ilham / gist:5dacd9ec3c003854b6b3
Created November 4, 2015 08:52 — forked from rusllonrails/gist:b51f0fc9c82a718c12fd
MAKE A PICTURE FOR DIV
http://jsfiddle.net/6FZkk/1/
http://stackoverflow.com/questions/6887183/how-to-take-screen-shot-of-a-div-with-javascript
http://html2canvas.hertzen.com/examples.html
OTHER
http://stackoverflow.com/questions/16894683/how-to-print-html-content-on-click-of-a-button-but-not-the-page
http://stackoverflow.com/questions/2255291/print-the-contents-of-a-div
http://stackoverflow.com/questions/468881/print-div-id-printarea-div-only
http://sarwarhossain.com/2010/10/05/print-a-div-open-new-window-print-and-close-using-javascirpt/

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@g-ilham
g-ilham / index.md
Last active August 29, 2015 14:15 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one