Skip to content

Instantly share code, notes, and snippets.

View timurcatakli's full-sized avatar

Timur Catakli timurcatakli

View GitHub Profile
function asyncFunc() {
return new Promise((resolve, reject) => {
setTimeout(() => {
const result = Math.random();
result > 0.5 ? resolve(result) : reject('Oppps....I cannot calculate')
}, 1)
});
}
for (let i=0; i<10; i++) {
@timurcatakli
timurcatakli / devise.md
Created February 15, 2016 06:31 — forked from nilthacker/devise.md
Add Devise to Rails app

Devise Installation:

1. Create new rails application:

rails new app-name --database=postgresql -BT

  • --database=postgresql-> Use postgres for database
  • -B -> skip initial bundle install
  • -T -> skip test suite (we're using rspec)

2. Add basic controller:

rails g controller welcome