Skip to content

Instantly share code, notes, and snippets.

View irridescentrambler's full-sized avatar
🤓
Exploring

Nikhil Mohadikar irridescentrambler

🤓
Exploring
View GitHub Profile
@irridescentrambler
irridescentrambler / gist:3e4440a095966e4f6a58f6d9c7756cf1
Created November 2, 2016 06:49 — 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.

@irridescentrambler
irridescentrambler / CarrierWave.md
Created June 2, 2017 08:37 — forked from marcusmalmberg/CarrierWave.md
Guide to setup CarrierWave which will upload a file to Amazon S3 in production environment and use local storage in development and test

CarrierWave home

https://github.com/jnicklas/carrierwave

This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.

CarrierWave installation

First add the gems.

@irridescentrambler
irridescentrambler / eb-cli-ubuntu-16-04
Created April 19, 2018 11:36 — forked from navid-taheri/eb-cli-ubuntu-16-04
How to install eb cli (awsebcli) on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-setuptools
sudo easy_install3 pip
pip -V
#pip 9.0.1 from /usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg (python 3.5)
sudo chown -R username:username ~/.local/
# add to ./*shrc
function Person(name, city){
this.name = name;
this.city = city;
}
Person.prototype.greet = function(){
console.log("Hello my name is " + this.name);
}
function Developer(name, city, language){
var nikhil = {
name: "Nikhil",
city: "Pune"
}
console.log(nikhil);
function Person(name, city){
this.name = name;
this.city = city;
}
Person.prototype.greet = function(){
console.log("Hello my name is " + this.name);
}
function Developer(name, city, language){
// Resolved promise
let promise1 = new Promise((resolve, reject) => {
resolve("Resolved this promise")
});
// Rejected promise
let promise2 = new Promise((resolve, reject) => {
reject("Rejected the promise");
});
let promise1 = new Promise((resolve, reject) => {
setInterval(() => {
resolve("Resolved the promise");
}, 10000)
});
// promise.then(callback_for_resolved, callback_for_rejected)
promise1.then(
(successResponse) => {
console.log(successResponse);
let promise1 = new Promise((resolve, reject) => {
setInterval(() => {
reject("This is rejected");
}, 10000);
});
promise1.catch((errorResponse) => {
console.log(errorResponse);
})
new Promise((resolve, reject) => {
console.log('Initial');
resolve();
})
.then(() => {
throw new Error('Something failed');
console.log('Do this');
})