Skip to content

Instantly share code, notes, and snippets.

@Xanaxiel
Xanaxiel / README.md
Created October 20, 2021 06:18 — forked from m2wasabi/README.md
AWS SNS to Discord Webhook

AWS SNS to Discord Webhook

Post SNS Message to Discord Webhook

Lambda Preferences

Key Value
Platform Node.js 14
handler index.handler
@Xanaxiel
Xanaxiel / StoreRepository.java
Created October 22, 2021 09:08 — forked from odrotbohm/StoreRepository.java
Dynamic, Querydsl-based filter bindings using Spring Data REST
public interface StoreRepository extends PagingAndSortingRepository<Store, String>,
QueryDslPredicateExecutor<Store>, QuerydslBinderCustomizer<QStore> {
@RestResource(rel = "by-location")
Page<Store> findByAddressLocationNear(Point location, Distance distance, Pageable pageable);
default void customize(QuerydslBindings bindings, QStore store) {
bindings.bind(store.address.city).single((path, value) -> path.startsWith(value));
bindings.bind(String.class).single((StringPath path, String value) -> path.contains(value));
}
@Xanaxiel
Xanaxiel / nginx_documentation.md
Created May 7, 2022 10:36 — forked from henhan/nginx_documentation.md
Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Documentation on how to override or extend the default nginx config on Elastic Beanstalk running om Amazon Linux 2. Correct as of 2021-08-01. Also see the general documentation on how to extend linux servers.

All references to placing files refer to putting a file at this location in your application bundle. You should never modify a file directly at your Elastic Beanstalk server by ssh:ing to the server, since such a change will be wiped whenever your servers autoscale or if you rebuild your application completely.

Adding a new location block

The easiest extension is to add a new location block to the main server block. This can be done by placing a .conf file with a server block in the folder .platform/nginx/conf.d/elasticbeanstalk. Any such file is automatically included in the main server block.

Overriding the default location