Skip to content

Instantly share code, notes, and snippets.

View bkvaiude's full-sized avatar
🏠
Working from home

Bhushan Vaiude bkvaiude

🏠
Working from home
View GitHub Profile
@bkvaiude
bkvaiude / promise.js
Last active September 7, 2021 14:02
JavaScript, I promise that I will stay with you, forever!
let a = () => new Promise(function (resolve, reject) {
setTimeout(() => resolve("pass"), 3000);
}).then((res) => { console.log("console outcome promise A after 3 secs"); return "As I promised, I'm here! " + res; })
let b = () => new Promise(function (resolve, reject) {
setTimeout(() => resolve("pass"), 5000);
}).then((res) => { console.log("console outcome promise B after 5 secs", res); return Promise.resolve("I'm resolved!") })
let c = () => new Promise(function (resolve, reject) {
setTimeout(() => reject("fail"), 7000);
@bkvaiude
bkvaiude / mvcstds
Last active August 29, 2015 14:13
MVC framework coding standards (Codeigniter, CakePHP, Django, Pylon, F3, Laravel, etc...)
Objectives
----------
* Basic things (https://www.drupal.org/coding-standards)
* Coding standards for a Model
* Coding standards for a Behaviours
* Coding standards for a Controller
* Coding standards for a Components
* Coding standards for a View
* Coding standards for a Helper