Skip to content

Instantly share code, notes, and snippets.

View leoschmitz's full-sized avatar
:octocat:
Working from home

Leonardo Schmitz leoschmitz

:octocat:
Working from home
View GitHub Profile
@leoschmitz
leoschmitz / venv_wrapper
Last active May 11, 2021 10:39 — forked from dbtek/venv_wrapper
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
# include following in .bashrc / .bash_profile / .zshrc
# usage
# $ mkvenv myvirtualenv # creates venv under ~/.venv/
# $ venv myvirtualenv # activates venv
# $ deactivate # deactivates venv
# $ rmvenv myvirtualenv # removes venv
export VENV_HOME="$HOME/.venv"
[[ -d $VENV_HOME ]] || mkdir $VENV_HOME
@leoschmitz
leoschmitz / run-django-admin.sh
Created September 28, 2018 21:12
running django-admin from virtualenv
#!/bin/bash
if [[ -z "${VIRTUAL_ENV}" ]]; then
echo "Please enter your virtualenv first!"
exit 1
else
#pragma hdrstop
#include <iostream>
using namespace std;
#include <wbemcli.h>
#include <comdef.h>
#pragma argsused
#ifdef _WIN32
#include <tchar.h>
#else
# trim right spaces
%s/\s\+$//