Skip to content

Instantly share code, notes, and snippets.

View ankkho's full-sized avatar

Ankit ankkho

  • AirAsia
  • Kuala Lumpur, Malaysia
  • 02:33 (UTC +08:00)
  • X @ankit_khosla
View GitHub Profile
@ankkho
ankkho / webpack-config.js
Created January 11, 2018 13:52
Production ready webpack-config for serverless functions -- suggestions are welcome!
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const CompressionPlugin = require('compression-webpack-plugin')
const path = require('path');
module.exports = {
entry: ['babel-polyfill', './handler.js'],
target: 'node',
externals: [nodeExternals()],
output: {
@ankkho
ankkho / javascript-developer-setup.sh
Last active July 1, 2020 06:34
Setup javascript development environment with a single shell script
echo '>>> Starting Setup!'
sudo apt-get update
echo '>>> installing git'
sudo apt-get install git -y
echo '>>> installing vs code editor'
sudo apt update
@ankkho
ankkho / ssl-on-nginx.md
Last active October 26, 2018 10:19
Setup SSL on nginx

Following link provides required steps for setting up SSL on nginx:
nginx setup

Use the below snippet for redirecting all request from http to https:
server {
listen 80 default_server;
listen [::]:80 default_server;
return 301 https://$host$request_uri;
@ankkho
ankkho / install_passenger_nginx_digital_ocean.sh
Last active August 29, 2015 14:27 — forked from sathishmanohar/install_passenger_nginx_digital_ocean.sh
Steps to setup and install passenger nginx and rails on digital ocean
# Login as root
ssh root@domain
# Create deploy user
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional
# Add user to sudo group
usermod -g <groupname> <username>
# Add .ssh/authorized_keys for deploy user
@ankkho
ankkho / nginx-403-forbidden-error-hosting-in-user-home-directory.md
Last active August 29, 2015 14:27 — forked from jhjguxin/nginx-403-forbidden-error-hosting-in-user-home-directory.md
nginx 403 forbidden error when server static file under user home directory