Skip to content

Instantly share code, notes, and snippets.

Aswa Paul giantas

Block or report user

Report or block giantas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
giantas /
Last active Apr 9, 2018 — forked from cecilemuller/
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

giantas / nginx.conf
Created Jan 24, 2018 — forked from micho/nginx.conf
nginx config for http/https proxy to localhost:3000
View nginx.conf
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate:
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
giantas / git-pushing-multiple.rst
Created Oct 23, 2017 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

giantas / gist:1550da6412422156108f1f2020091b03
Created Oct 12, 2017 — forked from Atem18/gist:4696071
Tutorial to seting up a django website in production.
View gist:1550da6412422156108f1f2020091b03

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
View openerp-Ubuntu-installation
# copied only the scripts from
sudo apt-get install openssh-server denyhosts
sudo apt-get update
sudo apt-get dist-upgrade
sudo adduser --system --home=/opt/openerp --group openerp
sudo apt-get install postgresql
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
#Enter password for new role: ********
giantas / download-website
Created Jun 1, 2017 — forked from datawebbie/download-website
Download/Backup/Sync whole website
View download-website
wget -p -e robots=off --wait 1 URL
giantas /
Created May 30, 2017 — forked from aubricus/
Python Progress Bar
# -*- coding: utf-8 -*-
# Print iterations progress
def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100):
Call in a loop to create terminal progress bar
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
giantas /
Created Apr 4, 2017 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


giantas /
Created Oct 23, 2016 — forked from aortbals/
Synchronize two folders using python.
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
You can’t perform that action at this time.