This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// - It will be one more preset as dependency | |
// - Await doesn't replace promises it works with promises so we will still use promises | |
// - It's another concept for an already complex project (think about the onboarding) | |
// - With promise we have error handling out of the box 'catch', with await we need to add try catch everywhere | |
// This will be in parallel | |
getFoo().then((message) => { | |
console.log(message); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
amountOfgames: Ember.computed('games', function() { | |
return this.get('games.length'); | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
this.route('games'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
firstName: 'Juraci', | |
lastName: 'Neto', | |
fullName: Ember.computed('firstName', 'lastName', function() { | |
return `${this.get('firstName')} ${this.get('lastName')}`; | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
firstName: 'Juraci', | |
lastName: 'Neto', | |
fullName: Ember.computed('firstName', 'lastName', function() { | |
return `${this.get('firstName')} ${this.get('lastName')}`; | |
}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"interval": { | |
"type": "number" | |
}, | |
"data": { | |
"type": "array", | |
"items": { | |
"type": "object", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node from source | |
mkdir ~/local | |
git clone [email protected]:nodejs/node.git | |
cd node | |
git checkout <lastest release tag here> | |
./configure --prefix=~/local | |
make install | |
echo export 'PATH="$HOME/local/bin:$PATH"' >> ~/.zshrc (replace .zshrc with your shell config file) | |
npm from source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HIGHLIGHT = (function(){ | |
var boxShadow = "0 0 15px rgba(81, 250, 200, 1)"; | |
var border = "1px solid rgba(81, 250, 200, 1)"; | |
return { | |
glow: function(element) { | |
var originalBoxShadow = element.style.boxShadow; | |
var originalBorder = element.style.border; | |
setInterval(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
yellow=`tput setaf 3` | |
upstream=$1 | |
branch=$2 | |
# checks if there is a remote repo called upstream | |
check_upstream() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.define :web do |web_config| |