Skip to content

Instantly share code, notes, and snippets.

View wycliffepeart's full-sized avatar
🏠
Working from home

Wycliffe Peart wycliffepeart

🏠
Working from home
View GitHub Profile
@wycliffepeart
wycliffepeart / beautiful.rest.api.docs.in.markdown.md
Created February 7, 2024 23:01 — forked from azagniotov/beautiful.rest.api.docs.in.markdown.md
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.

1. Create a dedicated project to host your Maven repository on Github

For example, you can have a mvn-repo project created.

2. Clone the remote mvn-repo into your local folder

For example, into ~/workspace/mvn-repo folder

3. Build your project and deploy it into your local folder.

In order to do this, you will need to have the following snippet in your pom.xml file

@wycliffepeart
wycliffepeart / HttpClientAutoConfiguration.java
Created March 14, 2021 16:44 — forked from jkuipers/HttpClientAutoConfiguration.java
Spring Boot auto-configuration example for an Apache Components HTTP client and its usage in all RestTemplates created by the RestTemplateBuilder, plus trace logging support
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateCustomizer;
@wycliffepeart
wycliffepeart / jwtRS256.sh
Created November 18, 2020 13:33 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@wycliffepeart
wycliffepeart / NestedScrollViewLoadMore
Created August 21, 2020 07:33 — forked from IkhwanSI13/NestedScrollViewLoadMore
load more data in NestedScrollView with NotificationListener
import 'package:cartenz_djp/style/colors.dart';
import 'package:cartenz_djp/widget/override/customTabs.dart' as Tabs;
import 'package:flutter/material.dart';
class ExampleWidget extends StatefulWidget {
@override
State<StatefulWidget> createState() => ExampleState();
}
class ExampleState extends State<ExampleWidget> {