Frontend
Backend
Frameworks de PHP
CMS
Mobile
Servidores
Edição de imagem e vídeo
Modelagem 3d
- Abrir o terminal e navegar até a pasta ~/.ssh ou até onde está o arquivo .pem (key pair) gerado pela instância
O arquivo .pem é obtido no seu console EC2 na web através do menu NETWORK & SECURITY > Key Pairs. Se não tiver nenhuma, basta criar uma nova e salvar em um lugar seguro no seu PC
- Executar o comando: $ ssh -i nome-do-arquivo.pem usuario@dns-da-instancia > Ex: $ ssh -i my-ec2-aws.pem [email protected]
Não é possível desfazer um push diretamente, como é feito com o commit utilizando o comando $ git reset --soft|mixed|hard hash-do-penultimo-commit
Para desfazer um push são necessários 3 passos:
- Utilizar o comando
$ git reset --mixed HEAD~1e em seguida utilizar o comando$ git stash(se preferir pode usar a opção-m "revertendo o push blablabla"para salvar o stash com um contexto do que foi feito - Utilizar o comando
$ git revert HEAD~0 - Utilizar o comando
$ git stash apply - Utilizar o comando
$ git push origin sua-branch -f
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
| const num = 15236.639; | |
| console.log(num.toLoacaleString('pt-BR')); | |
| // "15.236,639" | |
| console.log(new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(num)); | |
| // "R$15.236,64" | |
| const now = new Date(); | |
| console.log(now.toLocaleString('pt-BR')); | |
| // Function to generate a radom string with defined length |
- Palestrante: Stewan Pacheco
- Slides
- Palestrante: Rafael dos Santos
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
| <?php | |
| // Calcula a quantidade de dias úteis entre duas datas | |
| $util = 0; | |
| $inicio = date('2016-05-13'); | |
| $fim = date('2016-05-27'); | |
| function montaFeriados($feriados) { | |
| $resposta = []; |
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
| (function () { | |
| 'use strict'; | |
| angular | |
| .module('ngNameFormat', []) | |
| .directive('nameFormat', nameFormat); | |
| function nameFormat() { | |
| return { | |
| require: 'ngModel', |
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
| <html> | |
| <body> | |
| <script> | |
| window.showIP = function (resposta) { | |
| // alert('O seu IP: ' + resposta.ip); | |
| console.log(resposta); | |
| }; | |
| // este é um exemplo que funciona, mas aqui deve ser o url que queres usar | |
| var src = 'https://receitaws.com.br/v1/cnpj/12345678912345?callback=showIP'; |