$ cd ~/mongo/bin
$ ./mongod --dbpath ~/mongo-data (or w.e path)
or
$ cd ~/mongo/bin && ./mongod --dbpath ~/mongo-data (or w.e path)
or
$ brew services start [email protected]
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
namespace Bioliving\Database; | |
// Depois atualizar o composer.json com: | |
"autoload": { | |
"psr-4": { | |
"Bioliving\\": "src/config" | |
} | |
} | |
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
# Iniciar | |
git init | |
# Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'. | |
# "Stage" | |
git add -A | |
# Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again. | |
git commit -m "First commit" |
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
// começar ficheiro em modo debugging | |
// Entra no modo debugging | |
node inspect file.js~ | |
// mostra nLinhas de codigo em cima em baixo | |
list(nLinhas) | |
// executar linha a linha (n de next) | |
n |
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
{ | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
"vue" | |
], | |
"editor.fontFamily": "Consolas , Menlo, Monaco, 'Courier New', monospace, 'Apple Color Emoji'", | |
"editor.fontSize": 14, | |
"terminal.integrated.shell.osx": "zsh", | |
"[markdown]": { |
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
<template> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3"> | |
<h1>Animations</h1> | |
<hr> | |
<button class="btn btn-primary" @click="show=!show">Show alert</button> | |
<br><br> | |
<transition name="fade"> | |
<div class="alert alert-info" v-if="show">This is some info</div> |
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
const axios = require('axios'); | |
const getExchangeRate = async (from, to) => { | |
try { | |
const response = await axios.get('http://data.fixer.io/api/latest?access_key=d32d75de5146611ae7f23de0782ac09b'); | |
const euro = 1 / response.data.rates[from]; | |
const rate = euro * response.data.rates[to]; | |
if (isNaN(rate)) { | |
throw new Error(); |