Skip to content

Instantly share code, notes, and snippets.

View rajivseelam's full-sized avatar

Rajiv Seelam rajivseelam

View GitHub Profile
@rajivseelam
rajivseelam / A.README
Last active June 7, 2017 06:15
Create Google Alert and grab the feed.
Google alerts is a way to manage your content by subscribing to keywords. Here is an example on how to make that google alert with php.
Get the feed url and parse the feed. There won't be any feed available as soon the alert is created.
-------------------------------------
Copy composer.json and do composer update.
Add this to providers
@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!"
};
});
@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;
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
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;
#!/usr/bin/env bash
# Update Package List
apt-get update
# Install Some PPAs
apt-get install -y software-properties-common
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
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;
@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;