A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
This file contains 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
def csv_download_link(df, csv_file_name, delete_prompt=True): | |
"""Display a download link to load a data frame as csv from within a Jupyter notebook""" | |
df.to_csv(csv_file_name, index=False) | |
from IPython.display import FileLink | |
display(FileLink(csv_file_name)) | |
if delete_prompt: | |
a = input('Press enter to delete the file after you have downloaded it.') | |
import os | |
os.remove(csv_file_name) |
This file contains 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
" Source: https://stackoverflow.com/questions/12213597/how-to-see-which-plugins-are-making-vim-slow | |
:profile start profile.log | |
:profile func * | |
:profile file * | |
" At this point do slow actions | |
:profile pause | |
:noautocmd qall! |
This file contains 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
# Script to run stress test agains a URL using Apache Bench | |
# Usage: sh monitored_ab_stress.sh "$CMD" <URL-stress> <output-results-filename> | |
# where CMD="java -jar my-app.jar" | |
# script origin at https://github.com/jkremser/micronaut-app-k8s/blob/master/plot-test.sh | |
#!/bin/bash | |
echo "=== Monitored Apache Bench Test - Started" | |
echo $@ | |
URL_TEST=$2 |
This file contains 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
# docker run -d --rm --name my-app --network dkrnet -p 8080:8080 my-app | |
FROM maven:3.6.3-jdk-13 | |
COPY pom.xml /workspace/ | |
COPY src /workspace/src/ | |
WORKDIR /workspace/ | |
CMD ["mvn", "compile", "quarkus:dev", "-Dquarkus.live-reload.password=123"] |
This file contains 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
# Stage 1 - the build process | |
FROM node:10-alpine as build-deps | |
WORKDIR /src | |
COPY package.json package-lock.json ./ | |
RUN npm i --silent | |
COPY . ./ | |
RUN npm run build | |
# Stage 2 - the production environment | |
FROM nginx:1.12-alpine |
This file contains 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
/** | |
* Script to parse a Postman backupt to Insomnia keeping the same structure. | |
* | |
* It parses: | |
* - Folders | |
* - Requests | |
* - Environments | |
* | |
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS). | |
*/ |
This file contains 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 maven:3.6-jdk-11 as builder | |
WORKDIR /app | |
COPY pom.xml . | |
# download dependencies as specified in pom.xml | |
# building dependency layer early will speed up compile time when pom is unchanged | |
RUN mvn verify --fail-never | |
COPY src ./src |
Dependencies to Java Testing with:
- JUnit 5
- API tests
- Architecture tests
- TestContainer for IT
- Jacoco for coverage report
- Pitest for mutation test
To run:
This is a copy, original file can be seen here
See also: Platform Building Cheat Sheet
- Build the API with consumers in mind--as a product in its own right.
- Not for a specific UI.
- Embrace flexibility / tunability of each endpoint (see #5, 6 & 7).
- Eat your own dogfood, even if you have to mockup an example UI.