Skip to content

Instantly share code, notes, and snippets.

@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

@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 / 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 / any.component.html
Created July 27, 2021 00:45 — forked from arniebradfo/any.component.html
Angular *ngFor recursive list tree template
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
@Xanaxiel
Xanaxiel / digitalocean-promo-cupon-code-free-trial.md
Created July 11, 2018 23:29
DigitalOcean Coupon Code $35 / $100 1 Year Free Trial - July 2018

alt text

Digital Ocean Promo Coupon Code $35 / $100 1 Year Free Trial

1) Get $35 / $25 / $20 / $10 free DigitalOcean Credit.

2) Get DigitalOcean 1 Year Free Trial.

3) Get $100 Credit For 60 Days. $100 Free Credits

@Xanaxiel
Xanaxiel / ContextUtils.java
Created July 5, 2018 12:42 — forked from raulraja/ContextUtils.java
Simple Event Broadcast with JAVA / Spring AOP / Annotations
/*
* Copyright (C) 2011 47 Degrees, LLC
* http://47deg.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@Xanaxiel
Xanaxiel / ContextUtils.java
Created July 5, 2018 12:42 — forked from raulraja/ContextUtils.java
Simple Event Broadcast with JAVA / Spring AOP / Annotations
/*
* Copyright (C) 2011 47 Degrees, LLC
* http://47deg.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Xanaxiel
Xanaxiel / demo.html
Created April 18, 2017 22:52 — forked from uprel/demo.html
Leaflet multi map with sync plugin for showing MapQuest and MapBox tiles
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo</title>
<link rel="stylesheet" href="../leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet/plugins/zoomdisplay/dist/leaflet.zoomdisplay.css" />
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
@Xanaxiel
Xanaxiel / demo.html
Created April 18, 2017 22:52 — forked from uprel/demo.html
Leaflet multi map with sync plugin for showing MapQuest and MapBox tiles
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo</title>
<link rel="stylesheet" href="../leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet/plugins/zoomdisplay/dist/leaflet.zoomdisplay.css" />
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }