I hereby claim:
- I am kryptogeist on github.
- I am kryptogeist (https://keybase.io/kryptogeist) on keybase.
- I have a public key whose fingerprint is 139E 22A4 4121 3EE0 3C7A 3388 B2DC 3F8B 1331 27B8
To claim this, I am signing this object:
| # Use the official Ubuntu 20.04 image as the base | |
| FROM ubuntu:20.04 | |
| # Set environment variables to avoid interactive installation | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Update package list and install Squid | |
| RUN apt-get update && \ | |
| apt-get install -y squid |
| <html> | |
| <title>teste</teste> | |
| </html> |
I hereby claim:
To claim this, I am signing this object:
| var pares = function (item) { | |
| // Retorna apenas números pares | |
| return typeof item === 'number' && item % 2 === 0; | |
| }; | |
| [1, 2, 3, 4, 5, 6].filter(pares); // [2, 4, 6] | |
| // Equivalente | |
| var pares = [] |
| // Método construtor da classe Quimico | |
| function Quimico(nome) { | |
| this.nome = nome; | |
| } | |
| Quimico.prototype.falar = function () { | |
| return 'Eu sou o ' + this.nome; | |
| }; | |
| var quimico = new Quimico('Tobias'); |
| // number e string | |
| 1 == '1'; // true | |
| // number e boolean | |
| 0 == false; // true | |
| // object e undefined | |
| null == undefined; // true |
| Array.prototype.somar = function () { | |
| function saoNumeros(item) { | |
| return typeof item === 'number'; | |
| } | |
| function soma(anterior, atual) { | |
| return anterior + atual; | |
| } | |
| // Garante que todos os itens do Array |
| // Sem strict mode | |
| (function () { | |
| x = 1; // Tudo bem | |
| delete Object.prototype; // false | |
| function test(a, a, c) { }; // ok | |
| })(); | |
| // Com strict mode | |
| (function () { |
| // x está no escopo global | |
| var x = 1; | |
| // Uma function cria um novo escopo | |
| function test() { | |
| // y só existe dentro de test | |
| var y = 2; | |
| // x é acessível de dentro de test |