Skip to content

Instantly share code, notes, and snippets.

View NayabSiddiqui's full-sized avatar

Nayab Siddiqui NayabSiddiqui

View GitHub Profile
@NayabSiddiqui
NayabSiddiqui / axios-download-pdf.js
Last active October 6, 2020 06:02
Axios POST example to illustrate downloading of PDF from a REST api. Answer to the Stackoverflow question [Download binary file with Axios](https://stackoverflow.com/questions/49040247/download-binary-file-with-axios)
axios.post("http://localhost:8080/reports/proposal-summary/",
payload,
{
responseType: 'arraybuffer',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/pdf'
}
})
.then((response) => {
@NayabSiddiqui
NayabSiddiqui / logstash.conf
Created August 19, 2018 16:09
logstash configuration for logging based on spring cloud sleuth
input {
file {
type => "java"
path => "D:/Workspace/Public/spring-microservies-monitoring/books-api.log"
codec => multiline {
pattern => "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}.*"
negate => "true"
what => "previous"
}
}
@NayabSiddiqui
NayabSiddiqui / afterLiftingPageObject.ts
Last active July 15, 2023 06:22
Arguments Object: for "Summary and Results" paper summary.
type BearerToken = string;
type Page = {
pageNumber: number;
pageSize: number;
sort: Sort;
};
type SortDirection = 'asc' | 'desc';
type Sort = {
sortByField: string;