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 insertSomeData(callback) { | |
db.event.insert({ | |
date: 1451606400000, // 2016-01-01T00:00:00Z | |
action: 'A', | |
src_ip: '10.1.1.1', | |
src_port: 11111, | |
dst_ip: '10.1.1.2', | |
dst_port: 80 | |
}); | |
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
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<meta charset="utf-8"> | |
<title>input-output-component</title> | |
</head> | |
<body> |
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 | |
// composer require silex/silex symfony/security && php -S localhost:8888 -t $(pwd) | |
require 'vendor/autoload.php'; | |
use Silex\Application; | |
use Silex\Provider\SessionServiceProvider; | |
use Silex\Provider\SecurityServiceProvider; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\RedirectResponse; |
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
CREATE DATABASE sept22; | |
USE sept22; | |
CREATE TABLE developers ( | |
id INT AUTO_INCREMENT NOT NULL, | |
name VARCHAR(255) NOT NULL, | |
PRIMARY KEY(id) | |
) ENGINE = InnoDB; | |
CREATE TABLE languages ( |
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
{ | |
"require": { | |
"ext-openssl": "*", | |
"fabpot/goutte": "^3.2", | |
"symfony/console": "^4.2" | |
} | |
} |
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
{ | |
"require": { | |
"fabpot/goutte": "^3.2", | |
"symfony/console": "^4.2" | |
} | |
} |
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
FROM php-zendserver:2018.0 | |
# Valor padrão (usuado quando --env não for passado no docker run) | |
ENV APPLICATION_ENV local | |
# Patch | |
# Encontrei dois grandes problemas: | |
# 1. A imagem inicia um processo chamado /usr/local/zs-init/init.php que faz uma série de passos. Um desses passos é | |
# iniciar o zend-server através do systemd (via service). Isso é considerado uma má prática, visto que não devemos | |
# ter mais do que um processo por container. Além disso, o systemd isola variáveis de ambiente. |
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 | |
interface PortaInterface | |
{ | |
public function abrir(); | |
public function fechar(); | |
} | |
abstract class AbstractPorta implements PortaInterface | |
{ |
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 | |
class CadastroEntity | |
{ | |
private $estadoAtual; | |
private $nome; | |
public function __construct(string $nome, string $estadoAtual) | |
{ | |
$this->nome = $nome; |
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 | |
use Zend\Authentication\Storage\StorageInterface; | |
class InMemoryStorage implements StorageInterface | |
{ | |
private $contents = null; | |
public function isEmpty() | |
{ |
OlderNewer