Skip to content

Instantly share code, notes, and snippets.

View sheikhwaqas's full-sized avatar

Waqas Ashraf sheikhwaqas

View GitHub Profile
@sheikhwaqas
sheikhwaqas / gist:5575303
Created May 14, 2013 11:38
Install Apache 2.x.x on Red Hat Enterprise Linux
# To install C/C++ Compilers, AutoConf and AutoMake
yum install gcc gcc-c++ autoconf automake -y
# Install Perl Compatible Regular Expressions Libraries (PCRE)
yum install pcre-devel -y
# Download Apache Source from Apache's Website
# http://httpd.apache.org/download.cgi
wget http://www.us.apache.org/dist/httpd/httpd-2.x.x.tar.gz
@sheikhwaqas
sheikhwaqas / gist:5577119
Last active November 28, 2018 07:21
Install Apache / MySQL & PHP on a freshly created Red Hat Enterprise Linux Amazon EC2 Instance
# Login to your Amazon EC2 Instance via SSH.
# If you are logged in as root, you don't need to use the sudo command in the commands below.
# Update the current packages installed on the system
sudo yum upgrade
# Install the required packages before installing Apache / MySQL and PHP
sudo yum install gcc gcc-c++ autoconf automake pcre-devel \
libxml2-devel bzip2-devel libcurl-devel freetype-devel \
openldap-clients cyrus-sasl-devel openldap-devel \
@sheikhwaqas
sheikhwaqas / .bash_profile
Created June 13, 2013 16:04 — forked from JeffreyWay/.bash_profile
Recommended Bash Profile for Mac OS X
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@sheikhwaqas
sheikhwaqas / setup-mongodb.sh
Last active March 7, 2024 05:37
Install MongoDB Server on Ubuntu
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@sheikhwaqas
sheikhwaqas / setup-mysql.sh
Last active September 6, 2023 15:59
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@sheikhwaqas
sheikhwaqas / setup-webserver.sh
Last active July 18, 2019 21:01
Install Apache & PHP with MongoDB and XDebug Extensions on Ubuntu 14.04 LTS
#!/bin/bash
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH, HTTP & HTTPS Ports
ufw allow 22
@sheikhwaqas
sheikhwaqas / setup-lamp-vagrant.sh
Created June 30, 2014 08:32
Setting up LAMP on Vagrant
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Install essential packages
apt-get -y install \
gcc g++ autoconf automake make sendmail git ruby zsh acl zip unzip \
pkg-config gettext curl enchant \
libpcre3-dev libssl-dev libxml2 libxml2-dev libcurl4-openssl-dev libenchant-dev libfreetype6 libfreetype6-dev libbz2-dev \
libedit-dev libedit2 libtidy-dev libxslt1.1 libxslt1-dev libvpx-dev libxpm-dev libedit-dev libreadline-dev \
libjpeg8-dev libmcrypt4 libmcrypt-dev libmhash-dev libmhash2 mcrypt libc-client2007e libc-client2007e-dev
@sheikhwaqas
sheikhwaqas / mysqlbackup-tos3.sh
Last active April 10, 2019 17:54
Backup Individual MySQL Databases and Upload the same to Amazon S3. Please ensure Amazon AWS CLI tools are already installed and configured on the server.
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Temporary Path where the archive will be created and stored before uploading to S3
# Example: BACKUPPATH=/mnt
BACKUPPATH=/
# Amazon S3 Bucket name
# Example: S3BUCKET=production-database-backups
S3BUCKET=