Skip to content

Instantly share code, notes, and snippets.

View rajivseelam's full-sized avatar

Rajiv Seelam rajivseelam

View GitHub Profile
@rajivseelam
rajivseelam / server_install.sh
Created January 16, 2017 11:04
Provision New Server
# Update Package List
apt-get update
# Update System Packages
apt-get -y upgrade
# Force Locale
echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
@rajivseelam
rajivseelam / wp-laravel.conf
Created October 6, 2015 18:43
Wordpress and Laravel In Sibling Directories - NGINX
server {
server_name selldev.com;
access_log /home/rajiv/Projects/sellulose/storage/logs/access.log;
error_log /home/rajiv/Projects/sellulose/storage/logs/error.log;
index index.html index.htm index.php;
root /home/rajiv/Projects/sellulose/public;
index index.php index.html;
server {
listen 80;
server_name ssmi.constrat.in ssmi.constrat.in;
root /home/ubuntu/default/crusher/public;
index index.html index.htm index.php;
charset utf-8;
apt-get update
apt-get -y upgrade
echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
locale-gen en_US.UTF-8
apt-get install -y software-properties-common curl
#!/usr/bin/env bash
# Update Package List
apt-get update
# Install Some PPAs
apt-get install -y software-properties-common
sudo cat > /etc/nginx/fastcgi_params << EOF
fastcgi_param QUERY_STRING \$query_string;
fastcgi_param REQUEST_METHOD \$request_method;
fastcgi_param CONTENT_TYPE \$content_type;
fastcgi_param CONTENT_LENGTH \$content_length;
fastcgi_param SCRIPT_FILENAME \$request_filename;
fastcgi_param SCRIPT_NAME \$fastcgi_script_name;
fastcgi_param REQUEST_URI \$request_uri;
fastcgi_param DOCUMENT_URI \$document_uri;
fastcgi_param DOCUMENT_ROOT \$document_root;
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y software-properties-common
sudo apt-add-repository ppa:nginx/stable -y
sudo apt-add-repository ppa:rwky/redis -y
sudo apt-add-repository ppa:chris-lea/node.js -y
sudo apt-add-repository ppa:ondrej/php5-5.6 -y
cat > /etc/nginx/fastcgi_params << EOF
fastcgi_param QUERY_STRING \$query_string;
fastcgi_param REQUEST_METHOD \$request_method;
fastcgi_param CONTENT_TYPE \$content_type;
fastcgi_param CONTENT_LENGTH \$content_length;
fastcgi_param SCRIPT_FILENAME \$request_filename;
fastcgi_param SCRIPT_NAME \$fastcgi_script_name;
fastcgi_param REQUEST_URI \$request_uri;
fastcgi_param DOCUMENT_URI \$document_uri;
fastcgi_param DOCUMENT_ROOT \$document_root;
@rajivseelam
rajivseelam / default
Last active August 29, 2015 14:05
Ngnix Configuration
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
server {
listen 443 ssl;
server_name example.com www.example.com;
@rajivseelam
rajivseelam / provider.js
Created March 26, 2014 08:37
Service vs Factory vs Provider
//http://jsfiddle.net/rajivseelam/HS63T/1/
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
};
});