Skip to content

Instantly share code, notes, and snippets.

View mrcosta's full-sized avatar
👋

Mateus Costa mrcosta

👋
View GitHub Profile
@terry90
terry90 / Dockerfile
Last active February 5, 2022 16:29
Rust Dockerfile to build really small containers with postgres and SSL (~20Mo with rocket and diesel). Dependencies are cached for faster builds.
FROM clux/muslrust as build
WORKDIR /app/
# Deps caching begins
COPY Cargo.toml .
COPY Cargo.lock .
RUN mkdir src
RUN echo "fn main() {}" > src/main.rs
@melix
melix / README.md
Last active June 22, 2023 20:57
Reproducing the benchmarks of the Maven vs Gradle performance page

Gradle vs Maven performance reproduction instructions

Install the Gradle Profiler

This page explains how to reproduce the Gradle vs Maven performance numbers yourself. For that, you need to install the Gradle profiler, a tool which will automate benchmarking by running several builds in a row, with the appropriate options (it also runs Maven builds).

Generate the test projects

Our performance comparison uses 4 test projects:

@mirague
mirague / CustomComponent-test.js
Last active November 9, 2021 09:32
Testing React-Intl components with Enzyme's mount() and shallow() methods. This is a helper function which wraps the `intl` context around your component tests in an easy and efficient way.
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js';
const wrapper = mountWithIntl(
<CustomComponent />
);
expect(wrapper.state('foo')).to.equal('bar'); // OK
expect(wrapper.text()).to.equal('Hello World!'); // OK