Skip to content

Instantly share code, notes, and snippets.

@Mahlue-Goodson
Mahlue-Goodson / nginx+gunicorn+virtualenv+django tutorial.md
Created November 14, 2022 06:29
nginx+gunicorn+virtualenv+django tutorial

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.

@Mahlue-Goodson
Mahlue-Goodson / psql-ssh-tunnel.md
Created March 29, 2022 09:15 — forked from carld/psql-ssh-tunnel.md
SSH tunnel PSQL

Run a ssh tunnel to a database via jump / bastion host

  ssh -v -L 9999:[database host]:5432 jumphost

  psql -h localhost -p 9999 -U [user] --password -d [database]

If you get:

import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
import 'package:flutter/painting.dart';
// sample code
/*
class CornerDecorationTest extends StatefulWidget {
@override
_CornerDecorationTestState createState() => _CornerDecorationTestState();
}