Skip to content

Instantly share code, notes, and snippets.

View pitkane's full-sized avatar

Mikko Kohtala pitkane

View GitHub Profile
# Centos 7.3 comes with 1.8.3
# so update git from centos repo
yum update git
# it shows nothing to update
# we download git source and build and install latest git on Centos 7.3
{
"extends": [
"@frontend/coinbase",
"prettier",
"prettier/react",
"prettier/flowtype"
],
"rules": {
"flowtype/type-id-match": [
2,
@pitkane
pitkane / async-await.js
Created February 23, 2017 20:53 — forked from wesbos/async-await.js
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
});
}
@pitkane
pitkane / init.coffee
Last active January 27, 2016 12:33 — forked from Zequez/init.coffee
Comment out JSX code on Atom
# If you worked with React and JSX you probably noticed that you can't use JS comments when inside JSX sections
# Add this to your Atom init script
# Then add 'ctrl-cmd-/': 'comment-jsx' to your keymap.cson
# Then when you are on a JS/JSX file, just press cmd+ctrl+/ to use JSX-style comments that work with JSX elements
# Is not the most efficient way, but it's the cleanest and reliable one
# FORK UPDATE 27.1.2016:
# Overwriting "Toggle Comments" function:
# '.workspace .editor:not(.mini)':
# 'cmd-/': 'comment-jsx'