Skip to content

Instantly share code, notes, and snippets.

View timurcatakli's full-sized avatar

Timur Catakli timurcatakli

View GitHub Profile
@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

INTRO to BOOTSTRAP
1- Build a bootstrap based web page using bootstrap grid system
2- Learn about bootstrap components
3- Dive into form components
4- Discover how to make a page responsive
5- Places to get unique bootstrap templates
def num_islands(grid)
return 0 if not grid
result = 0
grid.length.times do |i|
grid[0].length.times do |j|
if grid[i][j] == 1
result += 1
extend(grid,i,j)
end
end
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 / .block
Last active January 9, 2018 03:25
Basic Bar Chart
license: mit
@timurcatakli
timurcatakli / .block
Last active January 9, 2018 03:43
Scales
license: mit
@timurcatakli
timurcatakli / .block
Created January 9, 2018 03:55
New York Temp Data Chart
license: mit
@timurcatakli
timurcatakli / .block
Created January 9, 2018 05:00
Peace Sign
license: mit
@timurcatakli
timurcatakli / .block
Created January 13, 2018 22:25
fresh block
license: mit
// Dhruven
// In the interview, I put myself in a rabbit hole
// with no possible solution
//
// What I was trying to do is to pass the arguments from the first
// function to the second function.
//
// The problem is the second function is return as a value
// therefore it is an independent function and there is no way for it to accept
// a value... The value needs to be passed as an argument by the executed function