Skip to content

Instantly share code, notes, and snippets.

View vigneshncc's full-sized avatar

Vignesh Gopalakrishnan vigneshncc

  • Chennai, TamilNadu.
View GitHub Profile
@vigneshncc
vigneshncc / node_nginx_ssl.md
Created November 19, 2020 15:43 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@vigneshncc
vigneshncc / hosts
Created August 9, 2020 17:22 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@vigneshncc
vigneshncc / .block
Last active April 15, 2020 10:45
Corona Status - Stacked Bar
license: mit
@vigneshncc
vigneshncc / .block
Last active April 9, 2020 09:38
Corona Status - March 2020
license: mit
public class DoublyLinkedList {
private int size = 0;
private Node last, first;
public void addLast(Node node) {
if (first == null) {
first = node;
last = first;
@vigneshncc
vigneshncc / mongoose-cheatsheet.md
Created October 26, 2019 17:17 — forked from subfuzion/mongoose-cheatsheet.md
mongoose cheatsheet

Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.

Install

$ npm install mongoose --save

Connect

const mongoose = require('mongoose');
@vigneshncc
vigneshncc / UbuntuMYSQL
Created June 24, 2016 17:29
Install MYSQL in Ubuntu
Update your system
===================
sudo apt-get update
Install MySQL
=============
sudo apt-get install mysql-server
Harden MySQL Server
===================
@vigneshncc
vigneshncc / sublimeSettings-Angular
Created June 24, 2016 16:40
How to Code AngularJS Quickly with Sublime Text Editor
After working with AngularJS for sometime now, I was looking for an editor that helps me code efficiently and effectively with AngularJS. This is when I discovered the Sublime Text Editor. This article presents tips on what needs to be done to write AngularJS code with the Sublime Text Editor.
I have to confess that it has been a fulfilling experience to code in AngularJS with Sublime once installation and configuration are done. I was able to complete my AngularJS hello world program within few minutes. Trust me, it is worth your time. Let me know what you think about it.
Do the following and enjoy the Angular ride:
Download and install Sublime Text Editor from http://www.sublimetext.com/.
Download Angular Sublime package (zip file) developed by the Angular-UI team from this page: https://github.com/angular-ui/AngularJS-sublime-package. This page consists of greater details on further customizing Sublime for AngularJS.
Unzip and name the root package (angularjs-sublime-packager-master) as “AngularJS”. Mak
@vigneshncc
vigneshncc / UbuntuMongoDB.txt
Last active June 23, 2016 18:55
Installing Stable Version of Mongo DB in Ubuntu
Installing Latest Stable version of Mongo DB in Ubuntu 14.04
============================================================
# Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# Create a list file for mongo db (Ubuntu 14.04)
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
# Reload local database
sudo apt-get update
# Install the latest stable version of mongo db
@vigneshncc
vigneshncc / adb.txt
Created June 23, 2016 17:41
Installing ADB for Android in linux
sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
adb devices
adb kill-server
adb start-server
adb connect <ipaddress>
adb -P <port> start-server