Skip to content

Instantly share code, notes, and snippets.

View ankitpopli1891's full-sized avatar
🏠
Working on @TracerLabs with @Techlyticaly

Ankit Popli ankitpopli1891

🏠
Working on @TracerLabs with @Techlyticaly
View GitHub Profile
@ankitpopli1891
ankitpopli1891 / Dockerfile
Last active February 26, 2019 11:28
Dockerizing a web app using Nginx
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/
# The following example shows a way to bundle a node package & serve it using Nginx,
# while keeping the image size small & the image build time shorter, using
# the Multi-Stage Builds
########### Stage 0
# the node 8 alpine image is ~63MB, while the node image is around ~670MB
# the alpine image is resource efficient, smaller in bundle size
# saves downloading time & precious bandwidth
FROM node:8.0.0-alpine

Keybase proof

I hereby claim:

  • I am ankitpopli1891 on github.
  • I am ankitpopli (https://keybase.io/ankitpopli) on keybase.
  • I have a public key whose fingerprint is 6671 B116 D665 A663 1CB3 BFA8 51A2 4862 FA5A 9483

To claim this, I am signing this object:

Verifying that +ankitpopli is my openname (Bitcoin username). https://onename.io/ankitpopli
@ankitpopli1891
ankitpopli1891 / storages.py
Created August 31, 2014 08:13
S3BotoStorage (django-storages) for Python 3
__author__ = 'ankit'
# Port to Python 3
#
# Source:
# https://bitbucket.org/david/django-storages/raw/f153a70ba254dc129d9403546809a02256ef75b5/storages/backends/s3boto.py
import os
import posixpath
import mimetypes
@ankitpopli1891
ankitpopli1891 / CameraViewFragment.java
Created February 22, 2014 20:34
Basic Camera Module for Android
import java.io.File;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;