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
| "use strict"; | |
| var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
| function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
| var Person = function () { | |
| function Person(firstName, lastName) { | |
| _classCallCheck(this, Person); |
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
| "use strict"; | |
| var Person = (function () { | |
| function Person(firstName, lastName) { | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| } | |
| ; | |
| Object.defineProperty(Person.prototype, "fullName", { |
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
| let regex = /country\,/gi; | |
| console.log(regex.source) // country\, (In nodejs is country\\,) | |
| regex.source == ‘country\,’; //false | |
| regex.source === ‘country\,’; //false |
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
| let a = new RegExp(/country\,/, 'gi'); | |
| console.log(a.source); | |
| a.source === 'country\,' // false | |
| a.source == 'country\,' // false |
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
| // JavaScript Document | |
| window.onload = function(){ | |
| navigatorUsed = navigator.appName; | |
| URL = new Array(); | |
| URL[0] = "services.xml"; | |
| tags = new Array(); | |
| tags[0] = "li"; | |
| tags[1] = "p"; |
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 soma(numeros) { | |
| let totalSoma = 0; | |
| let i; | |
| for (i = 0; i < numeros.length; i++) { | |
| totalSoma += numeros[i]; | |
| } | |
| return totalSoma; | |
| } |
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 divisao(numero, dividendo) { | |
| return numero/dividendo; | |
| } |
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
| class OperacoesBasicas { | |
| soma(numeros) { | |
| let i; | |
| let totalSoma = 0; | |
| for (i = 0; i < numeros.length; i++) { | |
| totalSoma += numeros[i]; | |
| } | |
| return totalSoma; |
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 saveOrderWrapper = (dependencies) => { | |
| const { repository, config } = dependencies; | |
| const { mongoDB } = repository; | |
| const { orderTTLInDays } = config.app; | |
| const orderTTL = (millesecondsInADay * orderTTLInDays); | |
| const asyncCall = prepareCall(dependencies); |
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
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |