This file contains hidden or 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
#add this code to your .bash_profile | |
#------ | |
export ANDROID_SDK_ROOT='/Users/<YOURUSER>/Library/Android/sdk' | |
export PATH=$PATH:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/tools/lib/x86_644 | |
#------ |
This file contains hidden or 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
# mac | |
brew install putty | |
#linux | |
apt-get install putty-tools | |
puttygen keybase.ppk -O private-openssh -o output.pem | |
#connect | |
ssh -i output.pem [email protected] |
This file contains hidden or 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
# -- UBUNTU + PHP7 + NGINX | |
# -- must add it to you pgp location | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; #replace if already there... | |
# -- must to check the listen path to php fpm sock is this file | |
nano /etc/php/7.0/fpm/pool.d/www.conf | |
# -- search for "listen = ", this path must be | |
/var/run/php/php7.0-fpm.sock |
This file contains hidden or 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
#---- renew ssl when you get the error | |
#---- Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. | |
certbot --authenticator standalone --installer apache -d <domain> --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2" |
This file contains hidden or 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
# run it from your project folder | |
# based on this link | |
# https://github.com/ionic-team/ionic-cli/issues/2835 | |
# erroroccurs when run... | |
cordova build android | |
# ANDROID_HOME=/usr/local/Caskroom/android-platform-tools/27.0.1 | |
# JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home | |
# Error: spawn EACCES |
This file contains hidden or 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
#install | |
sudo apt-get install yui-compressor | |
#to use, js and css files only | |
yui-compressor /path/to/file -o /path/to/new/file |
This file contains hidden or 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
$ mocha | |
Teste API magicthegathering.io | |
1) Deve receber 100 cartas | |
√ Deve receber a carta 'A Indiferente' (414ms) | |
1 passing (2s) | |
1 failing |
This file contains hidden or 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
$ mocha | |
Teste API magicthegathering.io | |
√ Deve receber 100 cartas (1468ms) | |
√ Deve receber a carta 'A Indiferente' (351ms) | |
2 passing (2s) |
This file contains hidden or 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
/** | |
* Arquivo exemplo para teste de api | |
* A API utilizada neste projeto eh | |
* @see https://magicthegathering.io/ | |
* | |
* Este exemplo faz parte de um post no medium | |
* @see https://medium.com/@hdeodato/teste-autom%C3%A1tico-de-api-rest-usando-com-node-js-mocha-chai-6aec4613d100 | |
* | |
* @author Henrique Deodato | |
* @see twitter.com/hdeodato |
This file contains hidden or 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
{ | |
"name": "teste_api", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC" |