Skip to content

Instantly share code, notes, and snippets.

View lvthillo's full-sized avatar

Lorenz Vanthillo lvthillo

View GitHub Profile
@sthomp
sthomp / kibana_nginx.conf
Last active September 11, 2020 09:08
nginx config to proxy connections to kibana on aws
worker_processes 1;
events {
worker_connections 1024;
}
http{
server {
listen 80;
server_name localhost;
@mihkels
mihkels / MultiConnectionSupport.java
Created March 2, 2016 13:51
Spring Boot with Letsencrypt SSL certificate support
@Configuration
public class MultiConnectionSupport {
@Value("${server.port}")
private int serverPort;
@Value("${server.http.port}")
private int httpServerPort;
@Bean
public EmbeddedServletContainerFactory servletContainer() {
@marcelog
marcelog / aws-sqs.policy
Last active December 4, 2023 07:07
SQS Policy to allow an S3 bucket to publish messages
{
"Version": "2012-10-17",
"Id": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME/SQSDefaultPolicy",
"Statement": [
{
"Sid": "example-statement-ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@dschep
dschep / raspbian-python3.6.rst
Last active October 24, 2023 14:57 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).

@hayderimran7
hayderimran7 / Jenkins+Script+Console.md
Created September 5, 2017 20:46 — forked from mubbashir/Jenkins+Script+Console.md
jenkins groovy scripts collection.
@iammuho
iammuho / Test Event
Last active May 15, 2019 13:53
Password Generator Lambda Function
To Encrypt:
{
"StackId": "a",
"RequestId": "b",
"PhysicalResourceId": "c",
"LogicalResourceId": "e",
"RequestType": "create",
"ResourceProperties": {
"PasswordLength": 20,
"KeyId": "KEYID",
@simoncos
simoncos / miniconda_on_rpi.md
Last active August 9, 2023 07:18
Install Miniconda 3 on Raspberry Pi
# nginx proxy for Elasticsearch + Kibana
server {
listen 127.0.0.1:8080;
server_name your.domain.com;
# AWS DNS resolver (if you're running on AWS EC2, else use google DNS 8.8.8.8)
resolver 172.31.0.2;
# Fix nginx resolving url only on config load (AWS can change the endpoint IP at anytime)
@arkadiyt
arkadiyt / main.py
Last active January 18, 2024 00:12
import boto3
import certbot.main
import datetime
import os
import raven
import subprocess
def read_and_delete_file(path):
with open(path, 'r') as file:
contents = file.read()
@magnetikonline
magnetikonline / README.md
Last active March 30, 2024 06:24
CloudFormation API Gateway endpoint calling a Lambda function using proxy integration example.

CloudFormation API Gateway integration to Lambda function

Template that will create the following:

  • API Gateway:
    • Deployed as a REGIONAL endpoint.
    • Single root method, accepting POST requests only, with Lambda proxy integration to a target function.
  • In-line Python Lambda function echoing back requesting users IP address to API Gateway requests:
    • IAM role for Lambda allowing CloudWatch logs access.
    • Permissions for Lambda that allow API Gateway endpoint to successfully invoke function.