Skip to content

Instantly share code, notes, and snippets.

View malkitsingh's full-sized avatar
🎯
Focusing

Malkit Singh malkitsingh

🎯
Focusing
View GitHub Profile
@malkitsingh
malkitsingh / info.txt
Last active April 14, 2019 11:20
Setting Node.JS on Ubuntu
**Install Node.js**
cd ~
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs
sudo apt-get install build-essential
**Install Nginx**
sudo apt-get update
@malkitsingh
malkitsingh / notes.js
Created January 19, 2018 06:19
some of node code snippets
// to upload file to s3 bucket.
var AWS = require('aws-sdk');
AWS.config = new AWS.Config();
AWS.config.accessKeyId = "XXX";
AWS.config.secretAccessKey = "XXXXX";
AWS.config.region = "ap-south-1";
var s3 = new AWS.S3();
@malkitsingh
malkitsingh / info.txt
Last active November 20, 2020 05:51
How to set up GitLab Runner on DigitalOcean
## Create a droplet ##
Fortunately, DigitalOcean has a one-click image with Docker pre-installed on Ubuntu 14.04 use this link to create new droplet.
https://www.digitalocean.com/features/one-click-apps/docker/
# Install the GitLab Runner #
First, login to the new droplet via SSH and verify that Docker is installed with:
`docker info`
@malkitsingh
malkitsingh / info.txt
Created September 4, 2019 09:21
Managing multiple sites from single server using Nginx
Short note on how to manage multiple sites with SSL from Nginx
make domainOne.com domainTwo.com file in
/etc/nginx/sites-available
Contents of domainOne.com will look like this once done
server {
server_name domainOne.com www.domainOne.com;