Skip to content

Instantly share code, notes, and snippets.

View MuriloEduardo's full-sized avatar
👨‍💻
Thinking about programming

Murilo Eduardo dos Santos MuriloEduardo

👨‍💻
Thinking about programming
View GitHub Profile
@MuriloEduardo
MuriloEduardo / docker-compose.yml
Last active June 15, 2024 14:18
Docker Compose with Zookeeper, Kafka and Kafka UI
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
hostname: zookeeper
container_name: zookeeper
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
@MuriloEduardo
MuriloEduardo / jest.config.js
Last active May 20, 2021 13:06
Are you trying to set up Jest to unitarily test your Vue 3 files in a Laravel project?
module.exports = {
roots: [
'<rootDir>/resources/js/',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/resources/js/$1',
},
moduleFileExtensions: ['js', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
@mikemiller891
mikemiller891 / phpunit.xml
Created October 8, 2020 20:55
A phpunit config for Laravel 8 to generate a code coverage report.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
@ls-joris-desmedt
ls-joris-desmedt / echo-websocket.tsx
Created May 15, 2019 14:21
Websockets + React Context
import React, { ReactNode, useContext, useEffect, useState } from 'react';
import { Websocket } from './websocket';
export type EchoWebSocketContextType = [
(event: any, filter?: string) => void,
(event: any) => void
];
export const EchoWebSocketContext = React.createContext<EchoWebSocketContextType>([
() => {},
() => {},
@rmoff
rmoff / docker-compose.yml
Last active June 2, 2024 17:14
Docker-Compose for Kafka and Zookeeper with internal and external listeners
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka: