Skip to content

Instantly share code, notes, and snippets.

View psgganesh's full-sized avatar
🤖
Currently exploring: DS and ML

Shankar Ganesh psgganesh

🤖
Currently exploring: DS and ML
View GitHub Profile
@psgganesh
psgganesh / node-and-npm-in-30-seconds.sh
Created October 27, 2015 08:39 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@psgganesh
psgganesh / gist:c651aa0815655c4d59fb
Created November 17, 2015 11:08 — forked from prellele/gist:1825744
Using StartSSL Certs with Nginx-Webserver

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

@psgganesh
psgganesh / upgradeSchedule.sh
Created January 9, 2016 08:23
Un attended server upgrades
# Script for ubuntu security updates and server upgrades
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
# Install unattended upgrade first time
# sudo apt-get install unattended-upgrades
# sudo dpkg-reconfigure unattended-upgrades
@psgganesh
psgganesh / sparkplug.nginx.conf
Created January 15, 2016 05:41
Laravel nginx conf
server {
listen 80;
server_name sparkplug.app;
root "/var/www/sparkplug/public";
index index.html index.htm index.php;
charset utf-8;
location / {
@psgganesh
psgganesh / kpm-setup
Last active April 7, 2016 16:02
KPM lemp project setup
# Name: kpm-setup.sh
# Description: Automated setup of LEMP stack with desired laravel project
# Author: Shankar <shankar.ganesh@ellipsonic.com>
# Twitter handle: @psgganesh
# USAGE
# CURL or WGET the RAW URL of this file and run below two commands
# 1. chmod +x kpm-setup.sh
# 2. sudo bash ./kpm-setup.sh
# Check your browser with the IP address of the host machine and viola, you have lemp installed and project setup
@psgganesh
psgganesh / lumen.sh
Last active April 27, 2016 15:23
Lumen installer
# Name: lumen.sh
# Description: Automated setup of LEMP stack with Lumen framework
# Author: Shankar <shankar.ganesh@ellipsonic.com>
# Twitter handle: @psgganesh
# USAGE
# CURL or WGET the RAW URL of this file and run below two commands
# 1. chmod +x lumen.sh
# 2. sudo bash ./lumen.sh
# Check your browser with the IP address of the host machine and viola, you have lumen installed
@psgganesh
psgganesh / node-npm.sh
Created June 22, 2016 17:24
Ubuntu 10.04 dev setup
sudo apt-get update
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
clear
node -v
@psgganesh
psgganesh / ubuntu lemp nginx conf
Last active July 15, 2016 09:02
My ubuntu lemp nginx conf
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@psgganesh
psgganesh / grub2.sh
Created July 15, 2016 12:21
Grub2 on ubuntu 12.04
# Grub 2
sudo sed -i '$ a\deb http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/ /' /etc/apt/sources.list
wget -q http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/Release.key -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install kcm-grub2
@psgganesh
psgganesh / 12.04-ubuntu14.04.sh
Created July 23, 2016 15:29
12.04 to 14.04 upgrade sh
sudo apt-get update
sudo apt-get install update-manager-core
lsb_release -a
sudo do-release-upgrade --check-dist-upgrade-only --devel-release
sudo do-release-upgrade --devel-release