Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Leonardo Schmitz leoschmitz

🏠
Working from home
View GitHub Profile
@leoschmitz
leoschmitz / venv_wrapper
Last active May 11, 2021 — forked from dbtek/venv_wrapper
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
View venv_wrapper
# 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 Sep 28, 2018
running django-admin from virtualenv
View run-django-admin.sh
#!/bin/bash
if [[ -z "${VIRTUAL_ENV}" ]]; then
echo "Please enter your virtualenv first!"
exit 1
else
View WMILogicalToSerial.cpp
#pragma hdrstop
#include <iostream>
using namespace std;
#include <wbemcli.h>
#include <comdef.h>
#pragma argsused
#ifdef _WIN32
#include <tchar.h>
#else
View cheat sheet
# trim right spaces
%s/\s\+$//