Skip to content

Instantly share code, notes, and snippets.

View mamachanko's full-sized avatar
🔧
clank clank ...

Max Brauer mamachanko

🔧
clank clank ...
View GitHub Profile
@mamachanko
mamachanko / docker-compose.yml
Last active October 20, 2019 11:18
Minimal Minio docker-compose.yml
version: '3.7'
services:
minio:
image: minio/minio:RELEASE.2019-10-12T01-39-57Z
volumes:
- minio-data:/data
ports:
- "9000:9000"
environment:
@mamachanko
mamachanko / .gitignore
Last active March 17, 2019 17:48
blessed and SGR colors
node_modules
yarn.lock
@mamachanko
mamachanko / .gitignore
Last active March 5, 2019 21:18
Node, typescript, blessed "Hello World" - `npx ts-node hello-world.ts`
node_modules
@mamachanko
mamachanko / Hello.test.js
Created March 1, 2019 09:30
testing the order of children
import React from 'react';
import {render} from "react-testing-library";
const Hello = ({names}) => <div>
{names.map((name, index) => <p key={index}>{name}</p>)}
</div>;
it('<Hello /> displays names in order', () => {
const {getByText} = render(
<Hello names={[
@mamachanko
mamachanko / pocket-sized-tdd.md
Last active March 2, 2019 06:35
[WIP] mamachanko's pocket-sized TDD guide

pocket-sized TDD guide

tl;dr

  • write a failing test from the outside in
  • make it pass
  • refactor towards good design
  • take a break and repeat

Why you want tests

TODO why?

@mamachanko
mamachanko / testing_spring_endpoints.md
Last active February 19, 2019 07:58
[WIP] Testing Spring endpoints

If you are using JUnit 4, don’t forget to also add @RunWith(SpringRunner.class) to your test, otherwise the annotations will be ignored.

acceptance test

  • full (web) application context
  • exercise endpoints via (Test)RestTemplate
  • actual HTTP requests going over the local network
  • @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)

mockmvc acceptance test

  • full application context with mocked web environment
@mamachanko
mamachanko / 2.1.1.RELEASE
Last active January 24, 2019 19:14
Run pristine Spring Boot web app
➜ /tmp curl -sL git.io/fhr4u | bash -s 2.1.1.RELEASE
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 51161 100 51106 100 55 149k 164 --:--:-- --:--:-- --:--:-- 149k
Archive: web-app.zip
inflating: web-app/mvnw
creating: web-app/.mvn/
creating: web-app/.mvn/wrapper/
creating: web-app/src/
creating: web-app/src/main/
@mamachanko
mamachanko / .gitignore
Last active February 19, 2019 07:58
[WIP] Resources on mob and pair-programming
.idea
Sun Jul 15 13:45:16 UTC 2018
@mamachanko
mamachanko / apartment_hunt_berlin.md
Last active May 23, 2018 07:04
getting an apartment in Berlin