Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Taken from: http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/

Setting up Django with Nginx, Gunicorn, virtualenv, supervisor and PostgreSQL

[Django][1] is an efficient, versatile and dynamically evolving web application development framework. When Django initially gained popularity, the recommended setup for running Django applications was based around Apache with mod_wsgi. The art of running Django advanced and these days the recommended configuration is more efficient and resilient, but also more complex and includes such tools as: Nginx, Gunicorn, virtualenv, supervisord and PostgreSQL.

In this text I will explain how to combine all of these components into a Django server running on Linux.

@Sylyac2000
Sylyac2000 / ssh.md
Created September 27, 2022 05:30 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

# To install virtual environment in the system
py -m pip install --user virtualenv
# To check the current version of the virtual environment
py -m pip --version
# creating the virtual environment
virtualenv -p python3 virtual_environment_name
# activating the virtual environment
@Sylyac2000
Sylyac2000 / file1.txt
Created October 17, 2020 12:52
the description for this gist
String file contents
@Sylyac2000
Sylyac2000 / compact-child-routes
Created May 28, 2019 08:58 — forked from settermjd/compact-child-routes
Simple example of using child routes, using the Segment type, to keep a routing table in Zend Framework 2 simple and compact. For more information, check out http://www.masterzendframework.com/tutorial/child-and-segment-routes.
return array(
'router' => array(
'routes' => array(
'forecaster' => array(
'type' => 'Literal',
'options' => array(
'route' => '/forecaster',
'defaults' => array(
'__NAMESPACE__' => 'Forecaster\Controller',
'controller' => 'Forecaster',
@Sylyac2000
Sylyac2000 / country-dropdown-list.html
Created May 5, 2019 08:25 — forked from olivertappin/country-dropdown-list.html
Country HTML select drop down list
<select name="country">
<option>Afghanistan</option>
<option>Albania</option>
<option>Algeria</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antarctica</option>
<option>Antigua and Barbuda</option>
https://www.alltechabout.com/document-sharing-sites/
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
DrawableRequestBuilder drawableRequestBuilder = Glide.with(This
.load(url)
.fitCenter()
.animate(android.R.anim.fade_in);
if (mMediaFragmentListener.getLocalVideoUri() != null) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
Context context = getContext();
retriever.setDataSource(context, mMediaFragmentListener.getLocalVideoUri());
Bitmap frame = retriever.getFrameAtTime();