Skip to content

Instantly share code, notes, and snippets.

View roman-karpovich's full-sized avatar

Roman Karpovich roman-karpovich

View GitHub Profile
@twidi
twidi / ._README.md
Last active April 10, 2023 06:24
Pycharm and virtualenvwrapper, with postactivate

The problem

PyCharm has support for virtual environment.

But there are two problems:

  1. the virtual environment is not activated in the terminal (it is only in the python console)
  2. it doesn't support virtualenvwrapper and so doesn't run the postactivate file.

This gist is the solution I found to resolve these two problems.

@dlsniper
dlsniper / tutorial.md
Last active February 28, 2020 07:56
How to build nginx from sources on Ubuntu
export LANGUAGE="en_US.UTF-8" 
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
locale-gen en_US.UTF-8 
dpkg-reconfigure locales

apt-get install unzip libpcre3 libpcre3-dev libssl-dev libpcrecpp0 zlib1g-dev debhelper dh-systemd libgeoip-dev autotools-dev libgd2-noxpm-dev libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev po-debconf libexpat-dev libxslt1-dev
@Nagyman
Nagyman / workflows-in-django.md
Last active July 14, 2024 16:13
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@christianschmizz
christianschmizz / runinenv.sh
Created March 11, 2012 19:44 — forked from parente/runinenv.sh
run a command in virtualenv, useful for supervisord
#!/bin/bash
VENV=$1
if [ -z $VENV ]; then
echo "usage: runinenv [virtualenv] CMDS"
exit 1
fi
. ${WORKON_HOME}/${VENV}/bin/activate
shift 1
echo "Executing $@ in ${VENV}"
exec "$@"