Skip to content

Instantly share code, notes, and snippets.

View Mikodes's full-sized avatar
🦊

Mike Lopez Mikodes

🦊
View GitHub Profile
@Mikodes
Mikodes / ffmpeg-download.config
Created December 13, 2018 00:10 — forked from watanabeyu/ffmpeg-download.config
elastic beanstalkでffmpegをインストールするためのebextensionsコンフィグ(.ebextensions/ffmpeg-download.config)
packages:
yum:
ImageMagick: []
ImageMagick-devel: []
container_commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/release-source"
02-mkdir:
command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
03-tar:
@Mikodes
Mikodes / install_ffmpeg.sh
Created December 13, 2018 00:02 — forked from spookyuser/install_ffmpeg.sh
Installs FFmpeg on aws\whatever
# Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091
# And https://gist.github.com/rainabba/07425c3bc14a0bb51632f12e913d9081
#
# Usage: `sudo bash ./install_ffmpeg.sh`
# Config Variables
static_host=https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
filename=ffmpeg-git-64bit-static.tar.xz
#!/bin/sh
# Based on gist.github.com/gboudreau/install-ffmpeg-amazon-linux.sh
# and https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@Mikodes
Mikodes / 00-packages.config
Created November 14, 2018 14:25 — forked from keeth/00-packages.config
Django, Postgres 9.6 and Celery on Elastic Beanstalk - ebextensions
packages:
yum:
libjpeg-turbo-devel: []
libpng-devel: []
libcurl-devel: []
commands:
01_install_rhel_pg:
command: "(yum repolist |grep -q pgdg96) || sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm -y"
02_install_pg_devel:
@Mikodes
Mikodes / nginx-tuning.md
Created October 27, 2017 15:26 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@Mikodes
Mikodes / nginx.conf
Created February 29, 2016 21:58 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using: