Skip to content

Instantly share code, notes, and snippets.

View danishanees's full-sized avatar

Danish Anees danishanees

View GitHub Profile
@danishanees
danishanees / webbackup-tos3.sh
Last active April 28, 2016 15:04
webbackup-tos3.sh
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Amazon S3 Bucket name
# Example: S3BUCKET=production-database-backups
S3BUCKET=username-backups
# Individual Amazon S3 directories in the bucket separated by spaces.
# Prefix underscore(_) with a backslash(\) in directory name.
# Example: DIRECTORIES=(code1 code2 code3 code\_4)
@danishanees
danishanees / mysqlbackup-tos3.sh
Last active April 28, 2016 10:14 — forked from sheikhwaqas/mysqlbackup-tos3.sh
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=
@danishanees
danishanees / nanorc.txt
Last active December 22, 2015 13:50
nano_syntax_highlighting
## Nanorc files
include "/usr/share/nano/nanorc.nanorc"
## C/C++
include "/usr/share/nano/c.nanorc"
## HTML
include "/usr/share/nano/html.nanorc"
## TeX
@danishanees
danishanees / setup-webserver.sh
Last active August 29, 2015 14:25 — forked from sheikhwaqas/setup-webserver.sh
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
@danishanees
danishanees / setup-webserver.5.4.33.sh
Last active August 29, 2015 14:25
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