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
| Você é um engenheiro de software especializado em testes automatizados com Node.js e TypeScript. Sua tarefa é gerar testes unitários de altíssima qualidade, usando o framework Jest com ts-jest para o código a seguir. Os testes devem ser profissionais, confiáveis, legíveis e fáceis de manter. | |
| Objetivo: | |
| Escreva testes unitários completos, bem organizados, seguindo o padrão AAA (Arrange, Act, Assert). | |
| Certifique-se de cobrir 100% dos casos relevantes, incluindo fluxos principais, erros, exceções e casos de borda. | |
| Requisitos Obrigatórios: |
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
| // Gerar certificado do servidor | |
| // Onde tem leobaianotest.dev deve ser alterado para seu host | |
| openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -subj '/CN=leobaianotest.dev/O=leobaianotest.dev' | |
| # Gerar CA root que assinará o certificado do cliente e ficará no servidor | |
| openssl req -x509 -sha256 -newkey rsa:4096 -keyout ca.key -out ca.crt -days 356 -nodes -subj '/CN=Autoridade Cliente' | |
| # Gerar csr para gerar certificado do cliente | |
| openssl req -new -newkey rsa:4096 -keyout client.key -out client.csr -nodes -subj '/CN=Cliente' |
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
| {"lastUpload":"2020-01-30T17:45:26.941Z","extensionVersion":"v3.4.3"} |
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
| Para todas as instâncias | |
| docker stop $(docker ps -a -q) | |
| Remove todas as instâncias | |
| docker rm $(docker ps -a -q) | |
| Para todas as imagens | |
| docker image rm $(docker image ls -a -q) |
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
| $ cd /Applications/MAMP/Library/bin/ | |
| $ ./mysqldump --host=localhost -uroot -proot source_database > ~/Desktop/database_name-dump.sql |
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
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) |
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 | |
| function atom_search_where($where){ | |
| global $wpdb; | |
| if (is_search()) | |
| $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; | |
| return $where; | |
| } | |
| function atom_search_join($join){ | |
| global $wpdb; |
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 | |
| $estados = array ( | |
| 'AC'=>'Acre', | |
| 'AL'=>'Alagoas', | |
| 'AP'=>'Amapá', | |
| 'AM'=>'Amazonas', | |
| 'BA'=>'Bahia', | |
| 'CE'=>'Ceará', | |
| 'DF'=>'Distrito Federal', | |
| 'ES'=>'Espírito Santo', |
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 onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var tsvMenuEntries = [{name: "export as TSV files", functionName: "saveAstsv"}]; | |
| ss.addMenu("tsv", tsvMenuEntries); | |
| }; | |
| function saveAstsv() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheets = ss.getSheets(); | |
| // create a folder from the name of the spreadsheet |
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
| <script> | |
| function send_events( category, action, label ){ | |
| ga( 'create', 'UA-xxxxx' ); | |
| ga( 'send', 'event', { | |
| eventCategory:category, | |
| eventAction:action, | |
| eventLabel:label | |
| } | |
| ); | |
| } |
NewerOlder