- ⌘ + Tab switch between apps
- Press q to quit an app from this place
- ⌘ + Backtick to switch between multiple windows of an app
- Cntrl + ⌘ + F to go fullscreen or windowed
- ⌘ + T for a new tab
- ⌘ + Shift + T to reopen a closed tab
- Crank up Key Repeat in your keyboard setting
$ 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
// 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
# 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
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
Ir a Xampp/apache/Conf/Extra | |
Adicionar: | |
<VirtualHost *:80> | |
DocumentRoot "C:/xampp/htdocs\labmm4\Bioliving-API\public" | |
ServerName slimapp | |
</VirtualHost> | |
Feito! |
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
Debugging: chrome://net-internals/#events | |
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS | |
Access-Control-Allow-Credentials: 'Content-type, Authorization' | |
Access-Control-Allow-Origin: $ORIGIN | |
$ORIGIN = if(inWhitelist(requestOriginHeader) return requestOriginHeader | |
// Se esta na whitelist entao meter esse domain la | |
// Incluir ports no Allow Origin Header!!! |
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
/* | |
Ficheiro: exported.js | |
*/ | |
export const dataNascimento = '1996-08-15'// Apenas uma variavel/func o que for | |
export function idade(){ | |
return (new Date().getFullYear() - dataNascimento) | |
} | |
// Ou tudo numa linha, estamos a exportar um objecto com todas as propriedades seleccionadas |
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
/* | |
A promise is created with a resolve and reject function being | |
passed as arguments. Depending on the result, the appropriate function is | |
executed and a possible return value is passed as an argument. | |
*/ | |
let promise = new Promise((resolve,reject)=>{ | |
// then(func) | |
resolve('Ola!') | |
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
// OBJECT ORIENTED PROGRAMMING PHP | |
// Constructor de objecto = class | |
// Propriedades e Metodos (funcoes) | |
class Person{ | |
public $name; | |
public $email; | |
} |