Skip to content

Instantly share code, notes, and snippets.

View the4thdoctor's full-sized avatar

Federico Campoli the4thdoctor

View GitHub Profile
@the4thdoctor
the4thdoctor / gist:a4e122c65dd6394777a9919bd74a9278
Created October 20, 2017 06:13
Simple bash function for setting up a python virtualenv
function virtenv()
{
VENVDIR=~/pyvenv
VENVACT=${VENVDIR}/${1}/bin/activate
if [ -f ${VENVACT} ]
then
source ${VENVACT}
else
echo "Invalid virtualenv directory."
ls -l ${VENVDIR}
@the4thdoctor
the4thdoctor / pg_carbonara.sql
Last active December 2, 2022 13:20
Pg_carbonara
--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
(