Skip to content

Instantly share code, notes, and snippets.

View matthias-chlechowitz's full-sized avatar

Matthias Chlechowitz matthias-chlechowitz

View GitHub Profile
@matthias-chlechowitz
matthias-chlechowitz / README.md
Created August 2, 2019 09:45 — forked from sapessi/README.md
Continuous deployment of React websites to Amazon S3

Continuous deployment of React websites to Amazon S3

This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.

Files included

  • buildspec.yml: YAML configuration for CodeBuild, this file should be in the root of your code repository
  • configure.js: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).
  • index.js: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in a s3-deployment-custom-resource sub-folder of the repo
  • app-sam.yaml: Serverless Application model YAML file. This configures the S3 bucket and the cu
@matthias-chlechowitz
matthias-chlechowitz / iterm2-solarized.md
Created July 23, 2019 11:31 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@matthias-chlechowitz
matthias-chlechowitz / nginx.conf
Created April 29, 2019 13:48 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@matthias-chlechowitz
matthias-chlechowitz / php-pools.md
Created October 30, 2018 10:06 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@matthias-chlechowitz
matthias-chlechowitz / get-instance.sh
Created May 22, 2018 09:24 — forked from mince27/get-instance.sh
AWS Lightsail get instance info
# Full description of instance
aws lightsail get-instance --instance-name 'LightsailDemo'
# Return only the IP
aws lightsail get-instance --instance-name 'LightsailDemo' --query 'instance.privateIpAddress' --output text
# Connect
ssh -i demo.key ec2-user@<IP_ADDRESS>