Skip to content

Instantly share code, notes, and snippets.

View prastut's full-sized avatar
🕊️
In a hyperactive world - stillness is the deepest rebellion.

Prastut Kumar prastut

🕊️
In a hyperactive world - stillness is the deepest rebellion.
View GitHub Profile
@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}

On chatting to people

Chat is not the same as conversation. When you tag someone using the "@" or if you send them a direct message, you may be directly forcing them to change their focus to your problem. While this is good for you, it can be bad for a healthy and productive community. Here are a couple of rules to abide.

  • Only "@" tag people's names in the following cases.
    • Your comment is urgent/time-sensitive and you need the help of the "@" target. What is urgent? You are running a production application with 100s of users facing a broken API, it's urgent. You are experimenting or taking part in a competition and want an answer quickly, it's not urgent.
    • Your comment has grown stale and you still need an answer that the "@" target can provide. What is stale? In most cases, more than 2 days seems reasonable or if it's a weekend, 3 or more.
    • You comment is in a channel or thread where the "@" target is not present but you need them aware.
  • Abide by the "no hello" rule at all times. Provide