Skip to content

Instantly share code, notes, and snippets.

View manish-pragma's full-sized avatar

Manish Kumar manish-pragma

View GitHub Profile
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<HostName>example.com</HostName>
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
<HttpRedirectCode>302</HttpRedirectCode>
</Redirect>
@manish-pragma
manish-pragma / install-ffmpeg-amazon-linux.sh
Last active August 22, 2018 07:05 — forked from manish-kumar9a9/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
#!/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
@manish-pragma
manish-pragma / upgrade-php7.sh
Created July 9, 2018 10:37 — forked from heathdutton/upgrade-php7.sh
Upgrade PHP 7.0 to 7.1 on Amazon Linux (specifically for Elastic Beanstalk but should work elsewhere)
#!/usr/bin/env bash
# Upgrade an Amazon Linux PHP 7.0 EC2 to PHP 7.1
#
# Must be ran as sudo:
# sudo bash upgrade-php71.sh
#
# Can be added to ./.ebextensions/20_php.config like so:
# container_commands:
# 20_php71_upgrade:
# command: sudo bash scripts/upgrade-php71.sh