Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Ranking ..

Alexander Zagniotov azagniotov

🎯
Ranking ..
View GitHub Profile
View prepFprQrPrint.js
/*
alexPrintPrep($("textarea#phrase").val(), null, 210);
alexPrintPrep(address, privkey, 100);
<div id="printable-view-for-alex" class="alex-qr-container"></div>
@media print
{
View flight_boooking_service_200_OK.json
{
"reservation" : "p5e20A9hSi2IsV0soVpafQ==",
"name" : "Leanne Graham",
"phone" : "1-770-736-8031 x56442",
"basePrice" : "USD10.00",
"taxes" : "EUR19.62"
}
@azagniotov
azagniotov / include-reservation-service-stubs.yaml
Created May 2, 2021
include-reservation-service-stubs.yaml
View include-reservation-service-stubs.yaml
- request:
method: GET
url: /api/v1/reservations/1
# When sequenced responses is configured, on each incoming request to the same URI,
# a subsequent response in the list will be sent to the client. The sequenced
# responses play in a cycle (loop). In other words: after the response sequence plays
# through, the cycle restarts on the next incoming request
#
# https://github.com/azagniotov/stubby4j#response-object-properties
@azagniotov
azagniotov / include-account-service-stubs.yaml
Created May 2, 2021
include-account-service-stubs.yaml
View include-account-service-stubs.yaml
- request:
method: GET
url: /api/v1/accounts/1
response:
status: 200
headers:
content-type: application/json
file: json/account.service.expected.success.response.json
View stubs.yaml
includes:
- include-account-service-stubs.yaml
- include-reservation-service-stubs.yaml
@azagniotov
azagniotov / docker-compose.yaml
Created May 2, 2021
Using stubby4j in docker-compose.yaml
View docker-compose.yaml
# This section builds flight-booking application image to the stack
version: '3.8'
services:
flight-booking-service:
build: .
container_name: flight-booking-service
ports:
- 8080:8080
environment:
View scenario_table.md
Use-case # Account service Reservation service
1 200 OK 200 OK
2 200 OK 400 Bad Request
3 200 OK 403 Forbidden
4 200 OK 500 Internal Server Error
5 200 OK 200 OK (after 1500 millis to cause a read timeout) *
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active Jan 31, 2023
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
View beautiful.rest.api.docs.in.markdown.md
@azagniotov
azagniotov / download.all.adp.paystubs.js
Last active Jan 4, 2023
Downloads all pay-slips from ADP website
View download.all.adp.paystubs.js
/*
This has been tested in Chrome v55.0.2883.95 (64-bit)
1. Log into ADP website using the URL: https://my.adp.com/static/redbox/login.html (Make sure you are NOT in Incognito mode)
2. Open Developer Tools console
3. Run the following code in the console:
*/
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://my.adp.com/v1_0/O/A/payStatements?adjustments=yes&numberoflastpaydates=300');
View NegativeRegexTest.java
import org.junit.Test;
import java.util.regex.Pattern;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class NegativeRegexTest {