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 / 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 / 0_luna_dev.sh
Last active July 24, 2016 14:37
Elementary OS [ luna essentials ]
# Name: 0_luna_dev.sh
# Description: Automated setup of dev tools for elementary OS
# Author: Shankar <[email protected]>
# 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 / device.css
Created April 15, 2016 18:25 — forked from jsoverson/device.css
Quick css hacks to target android/ios
.visible-android {
display:none;
}
.visible-ios {
display:none;
}
.on-device .visible-android, .on-device .visible-ios {
display:inherit;
}
.device-ios .visible-android {
@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 / 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 <[email protected]>
# 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 / ghost.sh
Last active March 14, 2017 12:20
Ghost as forever
# Install ghost and forever, run it as a service
cd /var/www/
sudo wget https://ghost.org/zip/ghost-latest.zip
sudo apt-get -y install unzip
sudo unzip -d ghost ghost-latest.zip
cd ghost/
@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 / 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 / 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