Skip to content

Instantly share code, notes, and snippets.

Avatar

Federico Campoli the4thdoctor

View GitHub Profile
View pg_carbonara.sql
--load the schema in a postres database
-- to make a carbonara run
-- SELECT make_carbonara_please();
DROP TABLE IF EXISTS ingredients;
DROP TABLE IF EXISTS boiling_pot;
DROP TABLE IF EXISTS frying_pan;
DROP TABLE IF EXISTS mixing_bowl;
CREATE TABLE boiling_pot
(
@the4thdoctor
the4thdoctor / gist:a4e122c65dd6394777a9919bd74a9278
Created Oct 20, 2017
Simple bash function for setting up a python virtualenv
View gist:a4e122c65dd6394777a9919bd74a9278
function virtenv()
{
VENVDIR=~/pyvenv
VENVACT=${VENVDIR}/${1}/bin/activate
if [ -f ${VENVACT} ]
then
source ${VENVACT}
else
echo "Invalid virtualenv directory."
ls -l ${VENVDIR}